From 7ae2a5b80f9e842366c435870b353ec04c77c74c Mon Sep 17 00:00:00 2001
From: tgloeggl <tgloeggl@uos.de>
Date: Wed, 13 Oct 2021 10:06:00 +0200
Subject: [PATCH] fixes #302

---
 app/controllers/resources/room_request.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/controllers/resources/room_request.php b/app/controllers/resources/room_request.php
index e41014a099e..3ff3315b4ed 100644
--- a/app/controllers/resources/room_request.php
+++ b/app/controllers/resources/room_request.php
@@ -385,7 +385,7 @@ class Resources_RoomRequestController extends AuthenticatedController
             $end = new DateTime();
             $begin->setTimestamp($interval['begin']);
             $end->setTimestamp($interval['end']);
-            $availability[] = $room->isAvailable($begin, $end, [$interval['booking_id']]);
+            $availability[] = $room->isAvailable($begin, $end, $interval['booking_id'] ? [$interval['booking_id']] : []);
         }
 
         return $availability;
-- 
GitLab