From 5fde3c2a5633d8349dd496925f90618260671065 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Tue, 13 Jun 2023 07:25:30 +0000
Subject: [PATCH] prevent warnings, fixes #2725

Closes #2725

Merge request studip/studip!1843
---
 lib/classes/JsonApi/Routes/Blubber/FilterTrait.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/classes/JsonApi/Routes/Blubber/FilterTrait.php b/lib/classes/JsonApi/Routes/Blubber/FilterTrait.php
index 40bf4b0a098..2d74f9c63c8 100644
--- a/lib/classes/JsonApi/Routes/Blubber/FilterTrait.php
+++ b/lib/classes/JsonApi/Routes/Blubber/FilterTrait.php
@@ -27,8 +27,8 @@ trait FilterTrait
     {
         $filtering = $this->getQueryParameters()->getFilteringParameters() ?? [];
 
-        $filters['since'] = $filtering['since'] ? self::fromISO8601($filtering['since'])->getTimestamp() : null;
-        $filters['before'] = $filtering['before'] ? self::fromISO8601($filtering['before'])->getTimestamp() : null;
+        $filters['since'] = isset($filtering['since']) ? self::fromISO8601($filtering['since'])->getTimestamp() : null;
+        $filters['before'] = isset($filtering['before']) ? self::fromISO8601($filtering['before'])->getTimestamp() : null;
         $filters['search'] = $filtering['search'] ?? null;
 
         return $filters;
-- 
GitLab