Fix fatal on Special:Search
authorErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 26 Apr 2016 20:07:32 +0000 (13:07 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 26 Apr 2016 20:23:07 +0000 (13:23 -0700)
Icef1ecbe had a mistaken bit of code that called newSearchEngine when
it should have used getSearchEngine. Rename the function call to be
correct.

Change-Id: Id5c8b16b90e1d866d3c8ca31cc622442046da0e2

includes/specials/SpecialSearch.php

index 2069638..b01a45f 100644 (file)
@@ -211,8 +211,8 @@ class SpecialSearch extends SpecialPage {
                        return;
                }
                # If there's an exact or very near match, jump right there.
-               $title = $this->newSearchEngine()->
-                       getNearMatcher( $this->getConfig() )->getNearMatch( $term );
+               $title = $this->getSearchEngine()
+                       ->getNearMatcher( $this->getConfig() )->getNearMatch( $term );
 
                if ( !is_null( $title ) &&
                        Hooks::run( 'SpecialSearchGoResult', [ $term, $title, &$url ] )