Skip to content
Snippets Groups Projects
Commit c030a40d authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

fix checks using `is_array()` (which is always true now), fixes #3187

Closes #3187

Merge request studip/studip!2156
parent 41e2948b
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,7 @@ class StudipSemSearchHelper {
if (isset($this->params['type']) && $this->params['type'] != 'all'){
$sem_types = [$this->params['type']];
}
if (!empty($sem_types) && is_array($sem_types)) {
if ($sem_types) {
$clause = " AND c.status IN('" . join("','",$sem_types) . "') " . $clause;
}
......@@ -112,7 +112,7 @@ class StudipSemSearchHelper {
if ($this->params['scope_choose'] && $this->params['scope_choose'] != 'root'){
$sem_tree = TreeAbstract::GetInstance("StudipSemTree", false);
$view->params[0] = (is_array($sem_types) ? $sem_types : $sem_tree->sem_status);
$view->params[0] = $sem_types ?: $sem_tree->sem_status;
$view->params[1] = $this->visible_only ? "c.visible=1" : "1";
$view->params[2] = $sem_tree->getKidsKids($this->params['scope_choose']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment