From: RazeSoldier Date: Mon, 15 Oct 2018 15:58:26 +0000 (+0800) Subject: Use "break" instead of "continue" inside a switch X-Git-Tag: 1.31.2~88 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=8635864ed0dd388864cbe7d7e7f7f679256a8f4d;ds=sidebyside Use "break" instead of "continue" inside a switch "continue" statements in a switch are equivalent to "break". In PHP 7.3, will generate a warning. Bug: T206974 Change-Id: I54bcec013ff52ab81bff09f8f7ef02f3944a5b7d (cherry picked from commit f3b012b51f492155cd7acf4d7f641cd43147bfc0) --- diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php index bd0556aa7c..f05be36481 100644 --- a/maintenance/storage/checkStorage.php +++ b/maintenance/storage/checkStorage.php @@ -266,12 +266,12 @@ class CheckStorage { case 'historyblobcurstub': if ( strlen( $row->header ) == $headerLength ) { $this->addError( 'unfixable', "Error: overlong stub header", $oldId ); - continue; + break; } $stubObj = unserialize( $row->header ); if ( !is_object( $stubObj ) ) { $this->addError( 'restore text', "Error: unable to unserialize stub object", $oldId ); - continue; + break; } if ( $className == 'historyblobstub' ) { $concatBlobs[$stubObj->mOldId][] = $oldId;