When there are orders (status=3) having been made, but all of those orders have in the total column a decimal value of 0.00 (as when all of the products "sold" are free, consider that the database returns total_sales as the string "0.00", which is not false-like.
This particular string will auto-convert to the integer zero in the equation (problem!), but not in the test expression. This particular string is not empty() either.
In statistics.index.inc.php, near line 281, there is this part of the statement:
When there are orders (status=3) having been made, but all of those orders have in the
total
column a decimal value of 0.00 (as when all of the products "sold" are free, consider that the database returnstotal_sales
as the string "0.00", which is not false-like.This particular string will auto-convert to the integer zero in the equation (problem!), but not in the test expression. This particular string is not
empty()
either.Suggest a new line after line 273:
Then line 281: