diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2025-07-24 11:28:27 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-08-07 11:12:35 +0200 |
| commit | 350fee63e24e6096d437f7d8e4610b5068f82f8d (patch) | |
| tree | ca4189c205bb8b86e41f2abb5d54e2640fd8a731 | |
| parent | 53dc11d30e18e123a3cf24b0df44398c8e576769 (diff) | |
prevent php-warnings, fixes #5752
Closes #5752
Merge request studip/studip!4384
| -rw-r--r-- | app/controllers/course/block_appointments.php | 2 | ||||
| -rw-r--r-- | app/controllers/course/room_requests.php | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/course/block_appointments.php b/app/controllers/course/block_appointments.php index 31daa0d..e504edb 100644 --- a/app/controllers/course/block_appointments.php +++ b/app/controllers/course/block_appointments.php @@ -26,7 +26,7 @@ class Course_BlockAppointmentsController extends AuthenticatedController { parent::before_filter($action, $args); - $course_id = $args[0]; + $course_id = $args[0] ?? null; $this->course_id = Request::option('cid', $course_id); if (!get_object_type($this->course_id, ['sem']) || diff --git a/app/controllers/course/room_requests.php b/app/controllers/course/room_requests.php index ef58f8a..97622b5 100644 --- a/app/controllers/course/room_requests.php +++ b/app/controllers/course/room_requests.php @@ -480,7 +480,10 @@ class Course_RoomRequestsController extends AuthenticatedController $this->redirect('course/room_requests/request_show_summary/' . $this->request_id ); } else { $room = Room::find($this->fromSession('room_id')); - $this->toSession('room_category_id', $room->category_id); + + if ($room) { + $this->toSession('room_category_id', $room->category_id); + } $this->redirect( 'course/room_requests/request_find_matching_rooms/' . $this->request_id . '/2' |
