From 35cd588ea425c0bd1bb377a314cacf8f67f6b1c1 Mon Sep 17 00:00:00 2001 From: Craig Knudsen Date: Fri, 12 Apr 2024 10:14:28 -0400 Subject: [PATCH] Fix PHP 8 error: gmmktime(): Argument #4 ($month) must be of type ?int, string --- includes/functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 4141d9631..8dd9c6000 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -821,14 +821,14 @@ function date_to_epoch( $d, $gmt = true ) { if ( $gmt ) return gmmktime ( $dH, $di, $ds, - substr ( $d, 4, 2 ), - substr ( $d, 6, 2 ), - substr ( $d, 0, 4 ) ); + (int)substr ( $d, 4, 2 ), + (int)substr ( $d, 6, 2 ), + (int)substr ( $d, 0, 4 ) ); else return mktime ( $dH, $di, $ds, - substr ( $d, 4, 2 ), - substr ( $d, 6, 2 ), - substr ( $d, 0, 4 ) ); + (int)substr ( $d, 4, 2 ), + (int)substr ( $d, 6, 2 ), + (int)substr ( $d, 0, 4 ) ); }