Closed enricozamprogno closed 1 year ago
``PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /var/www/html/bollettino/lists/admin/actions/processqueue.php:1224 Stack trace:
thrown in /var/www/html/bollettino/lists/admin/actions/processqueue.php on line 1224
1223 $totaltime = $GLOBALS['processqueue_timer']->elapsed(1); 1224 $msgperhour = (3600 / $totaltime) * $counters['sent'];
PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /var/www/html/bollettino/lists/admin/actions/processqueue.php:262 Stack trace:
thrown in /var/www/html/bollettino/lists/admin/actions/processqueue.php on line 262"
260 $totaltime = $GLOBALS['processqueue_timer']->elapsed(1); 261 if ($totaltime > 0) { 262 $msgperhour = (3600 / $totaltime) * $counters['sent'];
timer Object $GLOBALS['processqueue_timer'] ( [start] => 1683886073329152 [previous] => 1683886073511945 )
totaltime=0,1828090000
As you see the the value returned by the method "elapsed" is a string rappresenting a float in italian locale ( with comma as decimal point ) and PHP don't get it in the division
the problem is in a sprintf in the method elapsed() og the class timer in admin/connect.php i have submitted a pull request "Update connect.php #956"
``PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /var/www/html/bollettino/lists/admin/actions/processqueue.php:1224 Stack trace:
0 /var/www/html/bollettino/lists/admin/processqueue.php(22): include()
1 /var/www/html/bollettino/lists/admin/index.php(754): include('...')
2 {main}
thrown in /var/www/html/bollettino/lists/admin/actions/processqueue.php on line 1224
1223 $totaltime = $GLOBALS['processqueue_timer']->elapsed(1); 1224 $msgperhour = (3600 / $totaltime) * $counters['sent'];
PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /var/www/html/bollettino/lists/admin/actions/processqueue.php:262 Stack trace:
0 [internal function]: my_shutdown()
1 {main}
thrown in /var/www/html/bollettino/lists/admin/actions/processqueue.php on line 262"
260 $totaltime = $GLOBALS['processqueue_timer']->elapsed(1); 261 if ($totaltime > 0) { 262 $msgperhour = (3600 / $totaltime) * $counters['sent'];
timer Object $GLOBALS['processqueue_timer'] ( [start] => 1683886073329152 [previous] => 1683886073511945 )
totaltime=0,1828090000
As you see the the value returned by the method "elapsed" is a string rappresenting a float in italian locale ( with comma as decimal point ) and PHP don't get it in the division