From 7d087fcdf3218f8101e592b78f948479b3d02fe2 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Mon, 25 Jul 2022 12:28:48 +0000 Subject: [PATCH] fix missing variables, fixes #1337 Closes #1337 Merge request studip/studip!825 --- app/controllers/course/studygroup.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/controllers/course/studygroup.php b/app/controllers/course/studygroup.php index bdf43de5b44..cbe711e2cc1 100644 --- a/app/controllers/course/studygroup.php +++ b/app/controllers/course/studygroup.php @@ -91,13 +91,9 @@ class Course_StudygroupController extends AuthenticatedController $stmt->execute([$GLOBALS['user']->id, $id]); $data = $stmt->fetch(); - if ($data['status'] == 'accepted') { - $membership_requested = true; - } + $membership_requested = $data['status'] === 'accepted'; $invited = StudygroupModel::isInvited($GLOBALS['user']->id, $id); - $participant = $perm->have_studip_perm('autor', $id); - if (!preg_match('/^(' . preg_quote($GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'], '/') . ')?([a-zA-Z0-9_-]+\.php)([a-zA-Z0-9_?&=-]*)$/', Request::get('send_from_search_page'))) { $send_from_search_page = ''; } else { @@ -141,7 +137,7 @@ class Course_StudygroupController extends AuthenticatedController $awidget = new LinksWidget(); $awidget->setTitle($action); - $awidget->addLink($infotext, $infolink, $icon, $infolink_options); + $awidget->addLink($infotext, $infolink ?? '#', $icon, $infolink_options ?? []); if ($send_from_search_page) { $awidget->addLink( _('zurück zur Suche'), -- GitLab