X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fuser%2FUserArray.php;h=c398e4904e0252f009025ed72ce350d3f446eeb3;hb=25ae1749cbc1ccdf2feb0b44dc071f5f597ffb48;hp=66d9c7a1f8cc5eb1a2067168b23d5459fb82e70b;hpb=9b670fb797813a8ed35750e2c83fe953a10f349e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/user/UserArray.php b/includes/user/UserArray.php index 66d9c7a1f8..c398e4904e 100644 --- a/includes/user/UserArray.php +++ b/includes/user/UserArray.php @@ -32,10 +32,7 @@ abstract class UserArray implements Iterator { if ( !Hooks::run( 'UserArrayFromResult', [ &$userArray, $res ] ) ) { return null; } - if ( $userArray === null ) { - $userArray = self::newFromResult_internal( $res ); - } - return $userArray; + return $userArray ?? new UserArrayFromResult( $res ); } /** @@ -84,12 +81,4 @@ abstract class UserArray implements Iterator { ); return self::newFromResult( $res ); } - - /** - * @param IResultWrapper $res - * @return UserArrayFromResult - */ - protected static function newFromResult_internal( $res ) { - return new UserArrayFromResult( $res ); - } }