Page MenuHomePhabricator

SeachEngineDummy class missing replacePrefixes() function
Closed, ResolvedPublic

Description

Author: gerry.riddell

Description:
I installed the 1.13.0rc1 code, and set Mediawiki up to use SQLite. When doing a search off the main page, I would always be presented with the following error:

Fatal error: Call to undefined method SearchEngineDummy::replacePrefixes() in F:\www\Program\www\localhost\wikidev\includes\specials\SpecialSearch.php on line 170

Looked at the SearchEngine class and the SearchEngineDummy class in the 'includes/SearchEngine.php' file.

Looked at the SearchEngineDummy class, confirmed that there was no 'replacePrefixes' function.

Looked at the SearchEngine class, confirmed that there was a 'replacePrefixes' function.

Added empty 'replacePrefixes' function to the SearchEngineDummy class.

Error went away.

I hope this helps, please feel free to ask for additional information if necessary.

-gerry.


Version: 1.13.x
Severity: enhancement

Details

Reference
bz14966

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 10:11 PM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz14966.
bzimport added a subscriber: Unknown Object (MLST).

Looks like there's no good reason to have a SearchEngineDummy class; the SearchEngine base class provides dummy implementations of all the necessary functions itself.

In r38159 (trunk) I've gone ahead and just switched SearchEngineDummy to a null extension of SearchEngine. (The "Dummy" class name is still useful, as it'll be more obvious that you've got a bogus object when debugging. :)

Applied as r38160 on 1.13 branch.

Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptMay 19 2017, 8:22 AM