From e69cad3de3f02a7748ff9d25b335fb00931c7fa5 Mon Sep 17 00:00:00 2001 From: Stephen Shkardoon Date: Tue, 24 Feb 2015 12:48:12 +1300 Subject: [PATCH] FIX Do not attempt to search non-existent classes --- code/MSSQLDatabase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index 98dce55..0eee06e 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -1444,6 +1444,9 @@ class MSSQLDatabase extends SS_Database { // Create one query per each table, $columns not used. We want just the ID and the ClassName of the object from this query. foreach($tables as $tableName=>$columns){ + // Don't bother trying to do things if the class doesn't actually exist + if (!class_exists($tableName)) continue; + $baseClass = ClassInfo::baseDataClass($tableName); $join = $this->fullTextSearchMSSQL($tableName, $keywords);