Bound the cache size of numberofWatchingusers()
[lhc/web/wiklou.git] / includes / PrefixSearch.php
index 13696ad..35be2a9 100644 (file)
@@ -29,7 +29,7 @@
 abstract class PrefixSearch {
        /**
         * Do a prefix search of titles and return a list of matching page names.
-        * @deprecated: Since 1.23, use TitlePrefixSearch or StringPrefixSearch classes
+        * @deprecated Since 1.23, use TitlePrefixSearch or StringPrefixSearch classes
         *
         * @param string $search
         * @param int $limit
@@ -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 ) {