Type error in Subs.php if statistics are disabled

Started by borish, October 05, 2014, 07:04:52 AM

Previous topic - Next topic

borish

If the option "activate statistics" is unchecked, a type error occurs in Sources/Subs.php if a topic is posted:

2: number_format() expects parameter 1 to be double, string given
File: /mnt/webb/e3/15/53865815/htdocs/WordPress_02/forum/Sources/Subs.php
Line: 742

Line 742 is
// Format the string with our friend, number_format.
    return number_format($number, is_float($number) ? ($override_decimal_count === false ? $decimal_count : $override_decimal_count) : 0, $decimal_separator, $thousands_separator);
}

Furthermore, the "most online" display is still present in this case, but shows no or meaningless numbers (1.1.1970) in this case.

Versions: SMF 2.0.9, php 5.3
Mods: Simple Portal
Repeatable: Always

See also http://www.simplemachines.org/community/index.php?topic=528495.0

Advertisement: