From 6b037e5e632ce66e9283e25e91a0dfd0ff3bf2c5 Mon Sep 17 00:00:00 2001 From: David Siegfried <david.siegfried@uni-vechta.de> Date: Fri, 15 Sep 2023 11:03:17 +0000 Subject: [PATCH] prevent php-warnings, closes #3189 Closes #3189 and #3188 Merge request studip/studip!2158 --- lib/classes/Seminar.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/classes/Seminar.class.php b/lib/classes/Seminar.class.php index 72fe6ad655e..3b94e6d26fb 100644 --- a/lib/classes/Seminar.class.php +++ b/lib/classes/Seminar.class.php @@ -2063,7 +2063,7 @@ get_title_for_status('dozent', 1, $this->status))); public function deleteMember($user_id): bool { $dozenten = $this->getMembers(); - if (count($dozenten) >= 2 || !$dozenten[$user_id]) { + if (count($dozenten) >= 2 || empty($dozenten[$user_id])) { $result = CourseMember::deleteBySQL('Seminar_id = ? AND user_id = ?', [$this->id, $user_id]); if ($result === 0) { return true; @@ -2091,7 +2091,7 @@ get_title_for_status('dozent', 1, $this->status))); } } - if ($dozenten[$user_id]) { + if (!empty($dozenten[$user_id])) { $query = "SELECT termin_id FROM termine WHERE range_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute([$this->id]); -- GitLab