Hello,
I see always those error in logs:
(https://static.forum.mpdb.tv/uploadimages/images/1486157226-erreur.png)
==>520: return number_format($number, (float) $number === $number ? ($override_decimal_count === false ? $decimal_count : $override_decimal_count) : 0, $decimal_separator, $thousands_separator);
That is a terribly weird one.
Does it happen only with that specific URL (https://forum.mpdb.tv/index.php?https://forum.mpdb.tv/) or with other URLs as well?
Sometimes it happens at this address:
https://forum.mpdb.tv/index.php?
Fichier: /home/shaitan/www/forum/sources/Subs.php
Ligne: 520
But most of the time it's the other address
If your need Admin access, files access, no problem.
AHA!
Little nasty bug! :P
And anyway it's a SimplePortal bug, so...
/me blames
@Spuds O:-)
Simple fix is to change in sources/subs/PortalBlocks.subs.php:
$totals += array(
'average_members' => comma_format(round($averages['registers'] / $total_days_up, 2)),
'average_posts' => comma_format(round($averages['posts'] / $total_days_up, 2)),
'average_topics' => comma_format(round($averages['topics'] / $total_days_up, 2)),
'average_online' => comma_format(round($averages['most_on'] / $total_days_up, 2)),
);
to:
$totals += array(
'average_members' => round($averages['registers'] / $total_days_up, 2),
'average_posts' => round($averages['posts'] / $total_days_up, 2),
'average_topics' => round($averages['topics'] / $total_days_up, 2),
'average_online' => round($averages['most_on'] / $total_days_up, 2),
);
Mostly unrelated:
@Spuds do you think it would be hard to add the whole stack trace of functions (the function/class names should be mostly enough) to the error log?
The current one was designed to work with the monolithic structure of SMF with no more than two to five nested function calls, and I feel that the more we add functions, the more difficult is to track down where the actual problem is. :-\
Why is comma_format causing a problem?
No idea what would be involved in adding additional trace info to the error.log. Makes sense to add it, just not sure what is needed!
Because it's applied twice: there and few lines below when the numbers are echo'ed.
Ah ha ... I think comma_format should be smart enough to handle my sloppy coding !
Beautiful, threre are no more errors in my logs !
Many thanks !
You know how strict is php when it comes to accepting data types! LOL