Fixed search (only variables may be passed by reference)
authorAlexander Ebert <ebert@woltlab.com>
Sun, 14 Jul 2013 21:11:25 +0000 (23:11 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 14 Jul 2013 21:11:25 +0000 (23:11 +0200)
wcfsetup/install/files/lib/system/search/SearchEngine.class.php

index bfe6d9c9a43314ebc8a4ea788a5250e80b40ebca..1ac8d7880142f24ed9243cee6aebef3932a443bb 100644 (file)
@@ -153,7 +153,8 @@ class SearchEngine extends SingletonFactory {
                foreach ($objectTypes as $objectTypeName) {
                        $objectType = $this->getObjectType($objectTypeName);
                        if (!empty($sql)) $sql .= "\nUNION\n";
-                       if (($specialSQL = $objectType->getSpecialSQLQuery($fulltextCondition, $searchIndexCondition, (isset($additionalConditions[$objectTypeName]) ? $additionalConditions[$objectTypeName] : null), $orderBy))) {
+                       $additionalConditionsConditionBuilder = (isset($additionalConditions[$objectTypeName]) ? $additionalConditions[$objectTypeName] : null);
+                       if (($specialSQL = $objectType->getSpecialSQLQuery($fulltextCondition, $searchIndexCondition, $additionalConditionsConditionBuilder, $orderBy))) {
                                $sql .= "(".$specialSQL.")";
                        }
                        else {