Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.9.3
-
Fix Version/s: 5.10.0-b2
-
Component/s: Client Interface, Modules
-
Labels:None
Description
In the cPanel module, on PHP 8.1, the service management stats page does not load the stats, and results in the following PHP error being logged:
Uncaught TypeError, code 0 in /components/modules/cpanel/views/default/tab_client_stats.pdt on line 36 Message: round(): Argument #1 ($num) must be of type int|float, string given
More information provided by the client:
tab_client_stats.pdt#35
'limit' => round(($stats->disk_usage['limit']) ?? 0, 2)
Limit in this case is empty which ends up getting passed in to round and
throughs that error.
Looks like on php 7 it just converted to zero but doesn't happen on 8