Closed berlin2123 closed 5 months ago
in the test in RHEL8/9. the display is fine, and no errors log in /var/log/www-error.log
@vvuksan , It is recommended to publish a new release now.
I still get a PHP error PHP Fatal error: Uncaught TypeError: number_format(): Argument #1 ($num) must be of type float, string given in /usr/share/ganglia/graph.d/metric.php:58
.
I still get a PHP error
PHP Fatal error: Uncaught TypeError: number_format(): Argument #1 ($num) must be of type float, string given in /usr/share/ganglia/graph.d/metric.php:58
.
It is not a bug of php versions. It is the same issue inside php5\7\8. You can test php versions in a oline-php-tester, such as testing the follow code in php tester
<?php
#$value = 1003.1;
$value = 'asdfa';
$value = ($value > 1000)
? number_format($value)
: number_format($value, 2);
print($value);
?>
You are Wellcome to report a new issue. note show how to reproduce it.
Ah all right. At least that was the last error I noticed when looking through the log files.
@iGeorgeX This log is cased by hosts down, which is an old issue when change from php5.2 to php5.3, teated in https://onlinephp.io/
Can be fixed by adding $value = (float)$value;
on line 56, seeing #379
now woks fine in php8. It is tested in RHEL8 (php7) and RHEL9 (php8). Both works fine !!!