From cfd8022deefaf2585425d904e8d5435352a16e06 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Fri, 24 Feb 2023 14:31:01 +0000 Subject: [PATCH] prevent php8 warnings, fixes #2215 Closes #2215 Merge request studip/studip!1445 --- app/views/admin/plugin/manifest.php | 2 +- app/views/calendar/schedule/entry.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/admin/plugin/manifest.php b/app/views/admin/plugin/manifest.php index 7ecc6e4a745..17d9bae2584 100644 --- a/app/views/admin/plugin/manifest.php +++ b/app/views/admin/plugin/manifest.php @@ -22,7 +22,7 @@ <dt><?= _('Beschreibung') ?></dt> <dd> - <? if ($manifest['description']): ?> + <? if (!empty($manifest['description'])): ?> <?= htmlReady($manifest['description']) ?> <? else: ?> (<?= _('keine Beschreibung vorhanden') ?>) diff --git a/app/views/calendar/schedule/entry.php b/app/views/calendar/schedule/entry.php index 66fe58edbb9..54d44e9cef4 100644 --- a/app/views/calendar/schedule/entry.php +++ b/app/views/calendar/schedule/entry.php @@ -1,9 +1,9 @@ -<? if (!empty($show_entry) && in_array($show_entry['type'], ['sem', 'virtual']) !== false) : ?> +<? if (!empty($show_entry) && in_array($show_entry['type'], ['sem', 'virtual'])): ?> <?= $this->render_partial('calendar/schedule/_entry_course.php') ?> - <? unset($this->show_entry) ?> -<? elseif ($show_entry && $show_entry['type'] == 'inst') : ?> + <? unset($show_entry) ?> +<? elseif (!empty($show_entry) && $show_entry['type'] === 'inst'): ?> <?= $this->render_partial('calendar/schedule/_entry_inst.php') ?> - <? unset($this->show_entry) ?> + <? unset($show_entry) ?> <? else : ?> <?= $this->render_partial('calendar/schedule/_entry_schedule.php') ?> <? endif ?> -- GitLab