aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDavid Siegfried <david.siegfried@uni-vechta.de>2025-07-24 11:28:27 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2025-08-07 11:12:37 +0200
commit814881711456df818b0ed127f0d0c3f742cf29b5 (patch)
treee0bf3601302a73633b3b9784419f1f512c0e88ac /app
parente3d7f779431d1e98b22b6aec9ea632b4f88059a3 (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.php2
-rw-r--r--app/controllers/course/room_requests.php5
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 4928d5a..58b43b3 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'