fix: Execute commands using the numeric conventions of the C locale. (#5192)

This commit is contained in:
Aaron Daniels
2016-12-21 08:40:02 +10:00
committed by Neil Lathwood
parent 5c156e7e01
commit 4e436f8a8b

View File

@@ -206,7 +206,7 @@ function check_service($command)
$valid_uom = array ('us', 'ms', 'KB', 'MB', 'GB', 'TB', 'c', 's', '%', 'B');
// Make our command safe.
$command = escapeshellcmd($command);
$command = 'LC_NUMERIC="C" '. escapeshellcmd($command);
// Run the command and return its response.
exec($command, $response_array, $status);