Fix previous commit
authorMatthias Schmidt <gravatronics@live.com>
Mon, 17 Oct 2016 18:17:55 +0000 (20:17 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 17 Oct 2016 18:17:55 +0000 (20:17 +0200)
wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php

index a86641f1856be28e09f5c11ef91d463031b1036d..5af7580e977866fbaa1a4ee0b0accbb09fdef167 100644 (file)
@@ -126,7 +126,7 @@ class BoxEditForm extends BoxAddForm {
                        $oldController = new $className;
                        
                        /** @noinspection PhpUndefinedMethodInspection */
-                       if ($oldController->getConditionDefinition() && (!$this->boxController || (!($this->boxController->getProcessor() instanceof IConditionBoxController)) || !$this->boxController->getProcessor()->getConditionDefinition())) {
+                       if ($oldController instanceof IConditionBoxController && $oldController->getConditionDefinition() && (!$this->boxController || (!($this->boxController->getProcessor() instanceof IConditionBoxController)) || !$this->boxController->getProcessor()->getConditionDefinition())) {
                                ConditionHandler::getInstance()->deleteConditions($oldController->getConditionDefinition(), [$this->box->boxID]);
                        }
                }