diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2025-07-24 11:28:27 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2025-07-24 11:28:27 +0000 |
| commit | adeef25cdd76acffda1462d4d949d447dba4acf6 (patch) | |
| tree | 3c476f3649e08c2f8013313e811f358bcdb99ecc /app | |
| parent | 9391714a2d78ef4ce0338c2c1698ee5cdf981157 (diff) | |
prevent php-warnings, fixes #5752
Closes #5752
Merge request studip/studip!4384
Diffstat (limited to 'app')
| -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 1628e94..88d7378 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 85d7a70..9ff4b8b 100644 --- a/app/controllers/course/room_requests.php +++ b/app/controllers/course/room_requests.php @@ -481,7 +481,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' |
