From 437b3c463a33e2083679cb6d40fa87a1595a3b39 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 12 Sep 2025 20:48:24 +0000 Subject: [PATCH] PHP8 fix for Agent time detail report git-svn-id: svn://192.168.202.10@3940 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php index 71213d84..817c5a19 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php @@ -61,6 +61,7 @@ # 220303-1427 - Added allow_web_debug system setting # 230526-1740 - Patch for user_group bug, related to Issue #1346 # 240801-1130 - Code updates for PHP8 compatibility +# 250912-1628 - PHP8 bug fixes # $startMS = microtime(); @@ -658,7 +659,7 @@ else ### BEGIN gather timeclock records per agent - $stmt="select $userSQL,sum(login_sec) from ".$timeclock_log_table." where event IN('LOGIN','START') and event_date >= '$query_date_BEGIN' and event_date <= '$query_date_END' $TCuser_group_SQL group by user limit 10000000;"; + $stmt="select $userSQL,if(sum(login_sec) is null, 0, sum(login_sec)) from ".$timeclock_log_table." where event IN('LOGIN','START') and event_date >= '$query_date_BEGIN' and event_date <= '$query_date_END' $TCuser_group_SQL group by user limit 10000000;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $punches_to_print = mysqli_num_rows($rslt); @@ -795,6 +796,7 @@ else if ($uc < 1) { $Suser[$uc] = $user; + $Scalls[$uc] = 0; $uc++; } $m=0;