From 9a071508fbaaad6e8c65f46b4247ae3fe3e21c46 Mon Sep 17 00:00:00 2001 From: Alexander Killing Date: Thu, 17 Mar 2022 09:35:08 +0100 Subject: [PATCH] fixed condition check on empty array --- Services/Object/classes/class.ilObjectListGUI.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Services/Object/classes/class.ilObjectListGUI.php b/Services/Object/classes/class.ilObjectListGUI.php index aeb1bcc00c4b..32d9de37684f 100644 --- a/Services/Object/classes/class.ilObjectListGUI.php +++ b/Services/Object/classes/class.ilObjectListGUI.php @@ -1124,7 +1124,6 @@ public function insertTitle() : void $this->tpl->setVariable("SCRIPT_PREVIEW_CLICK", $preview->getJSCall($this->getUniqueItemId(true))); $this->tpl->parseCurrentBlock(); } - } $this->tpl->parseCurrentBlock(); @@ -1492,7 +1491,7 @@ protected function parseConditions(int $toggle_id, array $conditions, bool $obli } $operator = ilConditionHandlerGUI::translateOperator($condition['trigger_obj_id'], $condition['operator']); - $cond_txt = $operator . ' ' . $condition['value']; + $cond_txt = $operator . ' ' . $condition['value']; // display trigger item $class = $this->obj_definition->getClassName($condition["trigger_type"]); @@ -1560,7 +1559,8 @@ public function insertPreconditions() : void return; } - if (isset($this->condition_target) && is_array($this->condition_target)) { + if (isset($this->condition_target) && is_array($this->condition_target) + && count($this->condition_target) > 0) { $conditions = ilConditionHandler::_getEffectiveConditionsOfTarget( (int) $this->condition_target['ref_id'], (int) $this->condition_target['obj_id'],