Followup af6d9aba: $search is a string, not an object
authorChad Horohoe <chadh@wikimedia.org>
Tue, 15 Apr 2014 18:50:10 +0000 (11:50 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Tue, 15 Apr 2014 18:50:10 +0000 (11:50 -0700)
Reusing variables means you end up turning a string to an object
and then confuse yourself by trying to pass it as a string again.

Change-Id: I82b5ca65864099c180d915055c43e6839bd4f4a2

includes/PrefixSearch.php

index 45c591a..a9179eb 100644 (file)
@@ -37,8 +37,8 @@ abstract class PrefixSearch {
         * @return Array of strings
         */
        public static function titleSearch( $search, $limit, $namespaces = array() ) {
-               $search = new StringPrefixSearch;
-               return $search->search( $search, $limit, $namespaces );
+               $prefixSearch = new StringPrefixSearch;
+               return $prefixSearch->search( $search, $limit, $namespaces );
        }
 
        /**