From 05a1e86caac35d921c2caa1aed136979a48b9173 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 25 Feb 2021 14:00:14 +0100 Subject: [PATCH] Print the unix load with 2 decimal digits on ACP IndexPage --- wcfsetup/install/files/lib/acp/page/IndexPage.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php index fdd87b5938..56057f962a 100755 --- a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php @@ -63,7 +63,12 @@ class IndexPage extends AbstractPage if (\function_exists('sys_getloadavg')) { $load = \sys_getloadavg(); if (\is_array($load) && \count($load) == 3) { - $this->server['load'] = \implode(', ', $load); + $this->server['load'] = \implode( + ', ', + \array_map(static function (float $value) { + return \sprintf('%.2F', $value); + }, $load) + ); } } } -- 2.20.1