Merge "Remove redundant ignore_user_abort() call in ApiStashEdit"
[lhc/web/wiklou.git] / includes / specialpage / AuthManagerSpecialPage.php
index 65cd2d2..e1f0588 100644 (file)
@@ -13,7 +13,8 @@ use MediaWiki\Session\Token;
  */
 abstract class AuthManagerSpecialPage extends SpecialPage {
        /** @var string[] The list of actions this special page deals with. Subclasses should override
-        * this. */
+        * this.
+        */
        protected static $allowedActions = [
                AuthManager::ACTION_LOGIN, AuthManager::ACTION_LOGIN_CONTINUE,
                AuthManager::ACTION_CREATE, AuthManager::ACTION_CREATE_CONTINUE,
@@ -434,10 +435,11 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
                                if ( is_string( reset( $status ) ) ) {
                                        $status = Status::newFatal( ...$status );
                                } elseif ( is_array( reset( $status ) ) ) {
-                                       $status = Status::newGood();
+                                       $ret = Status::newGood();
                                        foreach ( $status as $message ) {
-                                               $status->fatal( ...$message );
+                                               $ret->fatal( ...$message );
                                        }
+                                       $status = $ret;
                                } else {
                                        throw new UnexpectedValueException( 'invalid HTMLForm::trySubmit() return value: '
                                                . 'first element of array is ' . gettype( reset( $status ) ) );