From ff303519f4992f6cf776bb0471ac90fc0dab5867 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 9 Jan 2023 15:36:56 +0100 Subject: [PATCH] Fix #20: PHP 8.x - Uncaught Error & Uncaught TypeError (funcs.php) Co-authored-by: lck-git --- funcs.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/funcs.php b/funcs.php index 6f4b272..a39d2d6 100644 --- a/funcs.php +++ b/funcs.php @@ -137,7 +137,7 @@ function memberpages_ProcessList() list($day,$month,$year) = explode('.',$expires[$key]); } else $day = $month = $year = ''; - $member[$key]['expires'] = mktime(0,0,0,$month,$day,$year); + $member[$key]['expires'] = mktime(0,0,0,(int)$month,(int)$day,(int)$year); } @@ -312,9 +312,9 @@ function memberpages_NewPW() $newpassword = join("", $tmp); $newpassword = preg_replace_callback( '/[a-z|äöü]/i', - create_function('$m', - 'return rand(0,1) ? $m[0] ^ str_pad("", strlen($m[0]), " ") : $m[0]; - '), + function ($m) { + return rand(0,1) ? $m[0] ^ str_pad("", strlen($m[0]), " ") : $m[0]; + }, $newpassword ); }