Use "break" instead of "continue" inside a switch
authorRazeSoldier <razesoldier@outlook.com>
Mon, 15 Oct 2018 15:58:26 +0000 (23:58 +0800)
committerRazeSoldier <razesoldier@outlook.com>
Mon, 15 Oct 2018 15:58:26 +0000 (23:58 +0800)
"continue" statements in a switch are equivalent to "break". In PHP 7.3, will generate a warning.

Bug: T206974
Change-Id: I54bcec013ff52ab81bff09f8f7ef02f3944a5b7d

maintenance/storage/checkStorage.php

index 0ec24af..0dfb834 100644 (file)
@@ -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;