From: Matthias Schmidt Date: Mon, 17 Oct 2016 18:13:05 +0000 (+0200) Subject: Fix saving conditions for boxes X-Git-Tag: 3.0.0_Beta_3~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=84eb9b78cd02adcdff13c6962fedf8d5c79cd705;p=GitHub%2FWoltLab%2FWCF.git Fix saving conditions for boxes --- diff --git a/wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php b/wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php index 19fd944ec0..a86641f185 100644 --- a/wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php @@ -119,9 +119,11 @@ class BoxEditForm extends BoxAddForm { $this->objectAction->executeAction(); // delete old conditions - if ($this->box->getController() && $this->box->getController() instanceof IConditionBoxController) { + if ($this->box->objectTypeID) { + $className = ObjectTypeCache::getInstance()->getObjectType($this->box->objectTypeID)->className; + /** @var IConditionBoxController $oldController */ - $oldController = $this->box->getController(); + $oldController = new $className; /** @noinspection PhpUndefinedMethodInspection */ if ($oldController->getConditionDefinition() && (!$this->boxController || (!($this->boxController->getProcessor() instanceof IConditionBoxController)) || !$this->boxController->getProcessor()->getConditionDefinition())) {