From 3a8b0e1418d65712ae2f264356273be476e8b7be Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Thu, 18 Jan 2024 09:12:31 +0000
Subject: [PATCH] fixes #3648

Closes #3648

Merge request studip/studip!2523
---
 app/views/resources/room_request/planning.php | 2 +-
 lib/classes/forms/RangeInput.php              | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/views/resources/room_request/planning.php b/app/views/resources/room_request/planning.php
index 364ee27e71f..aeebb655c0b 100644
--- a/app/views/resources/room_request/planning.php
+++ b/app/views/resources/room_request/planning.php
@@ -134,7 +134,7 @@
     <?= MessageBox::info(_('Es wurde kein Raum ausgewählt!')) ?>
 <? endif ?>
 
-<? if ($requests && $resource): ?>
+<? if (isset($requests, $resource)): ?>
     <form class="default" method="post"
           action="<?= $controller->link_for('room_request/assign') ?>">
         <table id="external-events" class="default request-list">
diff --git a/lib/classes/forms/RangeInput.php b/lib/classes/forms/RangeInput.php
index 7a69e9eacfb..14334c766a0 100644
--- a/lib/classes/forms/RangeInput.php
+++ b/lib/classes/forms/RangeInput.php
@@ -11,9 +11,9 @@ class RangeInput extends Input
         $template->name = $this->name;
         $template->value = $this->value;
         $template->id = md5(uniqid());
-        $template->min = $this->attributes['min'];
-        $template->max = $this->attributes['max'];
-        $template->step = $this->attributes['step'];
+        $template->min = $this->attributes['min'] ?? null;
+        $template->max = $this->attributes['max'] ?? null;
+        $template->step = $this->attributes['step'] ?? null;
         $template->required = $this->required;
         $template->attributes = arrayToHtmlAttributes($this->attributes);
         return $template->render();
-- 
GitLab