X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FTitleArray.php;h=f6969851d5749d08607b97c1c56d8870b29c1bb4;hp=a1eabe5b25504e25c8b27742e41a278fa23560ba;hb=616525021b3691e30a980a42b837b7ad44ecfd09;hpb=80db2d4b9924eb41e1bbf220809d30d46a9ba23a diff --git a/includes/TitleArray.php b/includes/TitleArray.php index a1eabe5b25..f6969851d5 100644 --- a/includes/TitleArray.php +++ b/includes/TitleArray.php @@ -42,18 +42,6 @@ abstract class TitleArray implements Iterator { if ( !Hooks::run( 'TitleArrayFromResult', [ &$array, $res ] ) ) { return null; } - if ( $array === null ) { - $array = self::newFromResult_internal( $res ); - } - return $array; - } - - /** - * @param IResultWrapper $res - * @return TitleArrayFromResult - */ - protected static function newFromResult_internal( $res ) { - $array = new TitleArrayFromResult( $res ); - return $array; + return $array ?? new TitleArrayFromResult( $res ); } }