Ignore non-IObjectListCondition box controller conditions
authorMatthias Schmidt <gravatronics@live.com>
Sun, 8 Dec 2019 08:41:44 +0000 (09:41 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 8 Dec 2019 08:41:44 +0000 (09:41 +0100)
… for object filtering

wcfsetup/install/files/lib/system/box/AbstractDatabaseObjectListBoxController.class.php

index 65607554a187e13fc4d70476fbe6afd7351fa2fe..9e62b923dfb7966651edfe0dee631df0c7e6b9ce 100644 (file)
@@ -5,6 +5,7 @@ use wcf\data\object\type\ObjectType;
 use wcf\data\object\type\ObjectTypeCache;
 use wcf\data\DatabaseObjectList;
 use wcf\system\condition\ConditionHandler;
+use wcf\system\condition\ICondition;
 use wcf\system\condition\IObjectListCondition;
 use wcf\system\event\EventHandler;
 use wcf\system\exception\UserInputException;
@@ -314,9 +315,11 @@ abstract class AbstractDatabaseObjectListBoxController extends AbstractBoxContro
                
                if ($this->conditionDefinition) {
                        foreach ($this->box->getConditions() as $condition) {
-                               /** @var IObjectListCondition $processor */
+                               /** @var ICondition $processor */
                                $processor = $condition->getObjectType()->getProcessor();
-                               $processor->addObjectListCondition($this->objectList, $condition->conditionData);
+                               if ($processor instanceof IObjectListCondition) {
+                                       $processor->addObjectListCondition($this->objectList, $condition->conditionData);
+                               }
                        }
                }