Skip to content
Snippets Groups Projects
Commit 1cb47baf authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

prevent php-warnings, closes #3189

Closes #3189 and #3188

Merge request studip/studip!2158
parent d6dbcc06
No related branches found
No related tags found
No related merge requests found
......@@ -2068,7 +2068,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;
......@@ -2096,7 +2096,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]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment