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
* @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 );
}
/**