Skip to content

Commit

Permalink
fixed condition check on empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
alex40724 committed Mar 17, 2022
1 parent b0c4144 commit 9a07150
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Services/Object/classes/class.ilObjectListGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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"]);
Expand Down Expand Up @@ -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'],
Expand Down

0 comments on commit 9a07150

Please sign in to comment.