From d81405411c4b336cbe3b2894ae719b13fc86a721 Mon Sep 17 00:00:00 2001 From: Joe Date: Sat, 23 Jul 2022 00:47:07 +0200 Subject: [PATCH] php 8. strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated. Fixed. --- includes/date_functions.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/date_functions.inc b/includes/date_functions.inc index f80bb271..2538f79d 100644 --- a/includes/date_functions.inc +++ b/includes/date_functions.inc @@ -350,7 +350,8 @@ function sql2date($date_) global $SysPrefs; //for MySQL dates are in the format YYYY-mm-dd - + if ($date_ == null) + return ""; if (strpos($date_, "/")) { // In MySQL it could be either / or - list($year, $month, $day) = explode("/", $date_); -- 2.30.2