mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Exception when SiteTree or File are not present in MySQLDatabase->searchEngine()
This commit is contained in:
parent
357ea56c02
commit
463b23baee
@ -751,6 +751,9 @@ class MySQLDatabase extends SS_Database {
|
||||
* @param string $keywords Keywords as a string.
|
||||
*/
|
||||
public function searchEngine($classesToSearch, $keywords, $start, $pageLength, $sortBy = "Relevance DESC", $extraFilter = "", $booleanSearch = false, $alternativeFileFilter = "", $invertedMatch = false) {
|
||||
if(!class_exists('SiteTree')) throw new Exception('MySQLDatabase->searchEngine() requires "SiteTree" class');
|
||||
if(!class_exists('File')) throw new Exception('MySQLDatabase->searchEngine() requires "File" class');
|
||||
|
||||
$fileFilter = '';
|
||||
$keywords = Convert::raw2sql($keywords);
|
||||
$htmlEntityKeywords = htmlentities($keywords, ENT_NOQUOTES, 'UTF-8');
|
||||
|
Loading…
x
Reference in New Issue
Block a user