aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/autoinsert
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-30 06:57:51 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-30 06:57:51 +0000
commitcb11393661f5cdf9a1ddacb8cd9602de70f5b8f9 (patch)
treea1d34239ca3973ebb9f3b0797d3a8841f0fdec48 /app/views/admin/autoinsert
parentb506b133d371742ef23b3a22cc1c6bb20c860d40 (diff)
fixes #4221issue-4232
Closes #4221 Merge request studip/studip!3064
Diffstat (limited to 'app/views/admin/autoinsert')
-rw-r--r--app/views/admin/autoinsert/manual.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/admin/autoinsert/manual.php b/app/views/admin/autoinsert/manual.php
index dd0f834..a4f5f5e 100644
--- a/app/views/admin/autoinsert/manual.php
+++ b/app/views/admin/autoinsert/manual.php
@@ -114,14 +114,14 @@
<? foreach ($values[$type] as $key => $value): ?>
<? if (is_array($value)): ?>
<option value="<?= $key ?>"
- class="nested-item-header" <?= in_array($key, (array)@$filter[$type]) ? 'selected="selected"' : '' ?>><?= htmlReady($value['name']) ?></option>
+ class="nested-item-header" <?= in_array($key, $filter[$type] ?? []) ? 'selected' : '' ?>><?= htmlReady($value['name']) ?></option>
<? foreach ($value['values'] as $k => $v): ?>
<option value="<?= $k ?>"
- class="nested-item" <?= in_array($k, (array)@$filter[$type]) ? 'selected="selected"' : '' ?>><?= htmlReady($v) ?></option>
+ class="nested-item" <?= in_array($k, $filter[$type] ?? []) ? 'selected' : '' ?>><?= htmlReady($v) ?></option>
<? endforeach; ?>
<? else: ?>
<option
- value="<?= $key ?>" <?= in_array($key, (array)@$filter[$type]) ? 'selected="selected"' : '' ?>><?= htmlReady($value) ?></option>
+ value="<?= $key ?>" <?= in_array($key, $filter[$type] ?? []) ? 'selected' : '' ?>><?= htmlReady($value) ?></option>
<? endif ?>
<? endforeach; ?>
</select>