From 268a54dcfd08aff7113bc3afe8b784f36db2d0d4 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 6 Mar 2019 22:55:17 +0100 Subject: [PATCH] PHP 7.X produces A non-numeric value encountered in \includes\date_functions.inc when using date format 5 (YYYY/MM/D. --- includes/date_functions.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/date_functions.inc b/includes/date_functions.inc index e90e2e78..f80bb271 100644 --- a/includes/date_functions.inc +++ b/includes/date_functions.inc @@ -396,12 +396,12 @@ and converts to a yyyy/mm/dd format */ else // $how == 2 || $how == 5, YYYYMMDD or YYYYMmmDD list($year, $month, $day) = explode($sep, $date_); + if ($how > 2) + { + global $tmonths; + $month = array_search($month, $tmonths); + } if ($year+$day+$month) { - if ($how > 2) - { - global $tmonths; - $month = array_search($month, $tmonths); - } //to modify assumption in 2030 if ($SysPrefs->date_system == 0 || $SysPrefs->date_system == 3) { -- 2.30.2