From 24ffbd9bd182944daa8b12244b729562cd5f50db Mon Sep 17 00:00:00 2001 From: RazeSoldier Date: Fri, 24 Aug 2018 00:18:07 +0800 Subject: [PATCH] Use "break" instead of "continue" "continue" statements are equivalent to "break". In PHP 7.3, will generate a warning. Bug: T200595 Change-Id: I244ecb2e1ce5a76295f014fb1becd8d263196846 --- includes/json/FormatJson.php | 2 +- languages/LanguageConverter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index 1ab17a06f5..fbcb3bd3b8 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -271,7 +271,7 @@ class FormatJson { $lookAhead = ( $idx + 1 < $maxLen ) ? $str[$idx + 1] : ''; $lookBehind = ( $idx - 1 >= 0 ) ? $str[$idx - 1] : ''; if ( $inString ) { - continue; + break; } elseif ( !$inComment && ( $lookAhead === '/' || $lookAhead === '*' ) diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index c098518a96..cb0f66f1b7 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -773,7 +773,7 @@ class LanguageConverter { $warningDone = true; } $startPos += 2; - continue; + break; } // Recursively parse another rule $inner .= $this->recursiveConvertRule( $text, $variant, $startPos, $depth + 1 ); -- 2.20.1