X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FAuthManagerSpecialPage.php;h=8466399ee0b740d5799f12b24a3b43b63d27ddfc;hb=eb758b5fb152e1bee67239112649f43525a6fef2;hp=81e13f00f03359310aa4b0e71eb899ab644fb99c;hpb=91dd393b4c044588a4df0674b1e9035a0bf06feb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/AuthManagerSpecialPage.php b/includes/specialpage/AuthManagerSpecialPage.php index 81e13f00f0..8466399ee0 100644 --- a/includes/specialpage/AuthManagerSpecialPage.php +++ b/includes/specialpage/AuthManagerSpecialPage.php @@ -70,7 +70,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage { * Used to preserve POST data over a HTTP redirect. * * @param array $data - * @param bool $wasPosted + * @param bool|null $wasPosted */ protected function setRequest( array $data, $wasPosted = null ) { $request = $this->getContext()->getRequest(); @@ -223,7 +223,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage { * Load or initialize $authAction, $authRequests and $subPage. * Subclasses should call this from execute() or otherwise ensure the variables are initialized. * @param string $subPage Subpage of the special page. - * @param string $authAction Override auth action specified in request (this is useful + * @param string|null $authAction Override auth action specified in request (this is useful * when the form needs to be changed from to _CONTINUE after a successful * authentication step) * @param bool $reset Regenerate the requests even if a cached version is available @@ -254,7 +254,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage { $allReqs = AuthManager::singleton()->getAuthenticationRequests( $this->authAction, $this->getUser() ); - $this->authRequests = array_filter( $allReqs, function ( $req ) use ( $subPage ) { + $this->authRequests = array_filter( $allReqs, function ( $req ) { return !in_array( get_class( $req ), $this->getRequestBlacklist(), true ); } ); } @@ -432,11 +432,11 @@ abstract class AuthManagerSpecialPage extends SpecialPage { $status = Status::newFatal( new RawMessage( '$1', $status ) ); } elseif ( is_array( $status ) ) { if ( is_string( reset( $status ) ) ) { - $status = call_user_func_array( 'Status::newFatal', $status ); + $status = Status::newFatal( ...$status ); } elseif ( is_array( reset( $status ) ) ) { $status = Status::newGood(); foreach ( $status as $message ) { - call_user_func_array( [ $status, 'fatal' ], $message ); + $status->fatal( ...$message ); } } else { throw new UnexpectedValueException( 'invalid HTMLForm::trySubmit() return value: ' @@ -730,7 +730,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage { * Get an array value, or a default if it does not exist. * @param array $array * @param string $fieldName - * @param mixed $default + * @param mixed|null $default * @return mixed */ protected static function getField( array $array, $fieldName, $default = null ) {