summaryrefslogtreecommitdiffstats
path: root/1.patch
blob: 8fc91ff150ce3f23340dc6dccf5df104a30cc325 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 7575d9125f00f03b3ca644f4be6d1857f4311dd2 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 17 Oct 2019 12:39:10 +0200
Subject: [PATCH] Fix Trying to access array offset on value of type null

---
 lib/Horde/Date/Parser/Token.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Horde/Date/Parser/Token.php b/lib/Horde/Date/Parser/Token.php
index fcb8537..0d59994 100644
--- a/lib/Horde/Date/Parser/Token.php
+++ b/lib/Horde/Date/Parser/Token.php
@@ -74,7 +74,7 @@ function ($t) use ($tagClass) {
             }
         );
         $match = array_shift($matches);
-        return $match[1];
+        return (is_array($match) ? $match[1] : null);
     }
 
     /**