From 81d3adbd35797d7538450abd3e77fc17f2f2274a Mon Sep 17 00:00:00 2001 From: frytimo Date: Wed, 26 Apr 2023 23:26:53 -0300 Subject: [PATCH] cast string to float for memory usage shell_exec call (#6626) Co-authored-by: Tim Fry --- app/system/resources/dashboard/system_status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/system/resources/dashboard/system_status.php b/app/system/resources/dashboard/system_status.php index 5a55ce9f14..ac99c48992 100644 --- a/app/system/resources/dashboard/system_status.php +++ b/app/system/resources/dashboard/system_status.php @@ -137,7 +137,7 @@ if (stristr(PHP_OS, 'Linux')) { $free = shell_exec("/usr/bin/which free"); $awk = shell_exec("/usr/bin/which awk"); - $percent_memory = round(shell_exec(escapeshellcmd($free." | ".$awk." 'FNR == 3 {print $3/($3+$4)*100}'")), 1); + $percent_memory = round((float)shell_exec(escapeshellcmd($free." | ".$awk." 'FNR == 3 {print $3/($3+$4)*100}'")), 1); if ($percent_memory != '') { echo "\n"; echo "".$text['label-memory_usage']."\n";