Closed bhsmither closed 5 months ago
With respect to #3506:
In statistics.index.inc.php, near line 281, there is:
$divider = (float)$divider[0]['total_sales'];
This is inside a foreach() loop.
foreach()
This means that $divider no longer exists as an array after the first iteration.
$divider
Suggest near line 282:
$result['percent'] = (float)$divider[0]['total_sales'] ? number_format(100*($result['customer_expenditure']/$divider[0]['total_sales']), 2) : 0;
and delete line 281.
Relating to the comments in #3506, typecasting the test expression to a float will result false-like when the database result 'total_sales' is the string "0.00".
Thanks Brian!
With respect to #3506:
In statistics.index.inc.php, near line 281, there is:
This is inside a
foreach()
loop.This means that
$divider
no longer exists as an array after the first iteration.Suggest near line 282:
and delete line 281.
Relating to the comments in #3506, typecasting the test expression to a float will result false-like when the database result 'total_sales' is the string "0.00".