From: Chad Horohoe Date: Mon, 14 Jul 2014 15:42:59 +0000 (-0700) Subject: PrefixSearch: Avoid notice when no subpage exists X-Git-Tag: 1.31.0-rc.0~14957 X-Git-Url: http://git.cyclocoop.org/%22%20%20.%20generer_url_ecrire%28%22mots_tous%22%29%20.%20%22?a=commitdiff_plain;h=c30da5b0e968d95afb6f2c09dcb169467931d50a;p=lhc%2Fweb%2Fwiklou.git PrefixSearch: Avoid notice when no subpage exists Change-Id: I9e09b1c082e099f3b79716da5ab16239e256e4b2 --- diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index 13696ad5e1..f794b2aad4 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -166,7 +166,9 @@ abstract class PrefixSearch { protected function specialSearch( $search, $limit ) { global $wgContLang; - list( $searchKey, $subpageSearch ) = explode( '/', $search, 2 ); + $searchParts = explode( '/', $search, 2 ); + $searchKey = $searchParts[0]; + $subpageSearch = isset( $searchParts[1] ) ? $searchParts[1] : null; // Handle subpage search separately. if ( $subpageSearch !== null ) {