From 4f758891177e831c000c5cd66c1a02b21821dc52 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 7 Jun 2021 04:38:51 +0000 Subject: [PATCH] [php8-compat][REF] Fix Date unit tests in php8 by passing in 00 instead of null for hours,minutes and seconds --- CRM/Utils/Date.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Utils/Date.php b/CRM/Utils/Date.php index d33105c7c5..093862b844 100644 --- a/CRM/Utils/Date.php +++ b/CRM/Utils/Date.php @@ -966,9 +966,9 @@ class CRM_Utils_Date { */ public static function intervalAdd($unit, $interval, $date, $dontCareTime = FALSE) { if (is_array($date)) { - $hour = $date['H'] ?? NULL; - $minute = $date['i'] ?? NULL; - $second = $date['s'] ?? NULL; + $hour = $date['H'] ?? '00'; + $minute = $date['i'] ?? '00'; + $second = $date['s'] ?? '00'; $month = $date['M'] ?? NULL; $day = $date['d'] ?? NULL; $year = $date['Y'] ?? NULL; -- 2.25.1