[php8-compat][REF] Fix Date unit tests in php8 by passing in 00 instead of null for...
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 7 Jun 2021 04:38:51 +0000 (04:38 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 7 Jun 2021 04:38:51 +0000 (04:38 +0000)
CRM/Utils/Date.php

index d33105c7c54162adc83cf450bea7295537b9d55d..093862b8449ce954dd0c459447dff8131720c810 100644 (file)
@@ -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;