Commit 6e31b09
authored
Update main.php humanize_usage_size() (hestiacp#4015)
* Update main.php humanize_usage_size()
Tweak humanize_usage_size() so that it doesn't die part way through with:
2023/09/21 14:18:16 [error] 353479#0: *56 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: number_format(): Argument hestiacp#1 ($num) must be of type float, string given in /usr/local/hestia/web/inc/main.php:368
Stack trace:
#0 /usr/local/hestia/web/inc/main.php(368): number_format()
hestiacp#1 /usr/local/hestia/web/templates/pages/list_user.php(246): humanize_usage_size()
hestiacp#2 /usr/local/hestia/web/inc/main.php(202): include('...')
hestiacp#3 /usr/local/hestia/web/list/user/index.php(33): render_page()
hestiacp#4 {main}
thrown in /usr/local/hestia/web/inc/main.php on line 368" while reading upstream, client: 81.174.134.33, server: _, request: "GET /list/user/ HTTP/2.0", upstream: "fastcgi://unix:/run/hestia-php.sock:", host: "brian2022.newbyhost.com:9183", referrer: "https://brian2022.newbyhost.com:9183/list/web/"
For some reason some stats come back as null, which breaks this function1 parent 3540e8a commit 6e31b09
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
355 | 358 | | |
356 | 359 | | |
357 | 360 | | |
| |||
0 commit comments