X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FPrefixSearch.php;h=718750f58ccf497d4a13418084ff3a36f0ba3ac1;hb=d607e6a70bb0250aad5a899aa14b663eb3404766;hp=35be2a9d8792e2b206ec6f303a4fd98bb65ee8cd;hpb=0525f22b8825c617fffa98f191ab07e8113da085;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index 35be2a9d87..718750f58c 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -174,6 +174,9 @@ abstract class PrefixSearch { if ( $subpageSearch !== null ) { // Try matching the full search string as a page name $specialTitle = Title::makeTitleSafe( NS_SPECIAL, $searchKey ); + if ( !$specialTitle ) { + return array(); + } $special = SpecialPageFactory::getPage( $specialTitle->getText() ); if ( $special ) { $subpages = $special->prefixSearchSubpages( $subpageSearch, $limit ); @@ -192,12 +195,12 @@ abstract class PrefixSearch { // Unlike SpecialPage itself, we want the canonical forms of both // canonical and alias title forms... $keys = array(); - foreach ( SpecialPageFactory::getList() as $page => $class ) { + foreach ( SpecialPageFactory::getNames() as $page ) { $keys[$wgContLang->caseFold( $page )] = $page; } foreach ( $wgContLang->getSpecialPageAliases() as $page => $aliases ) { - if ( !array_key_exists( $page, SpecialPageFactory::getList() ) ) {# bug 20885 + if ( !in_array( $page, SpecialPageFactory::getNames() ) ) {# bug 20885 continue; }