diff options
author | Patrik Kernstock <info@pkern.at> | 2017-06-01 14:10:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-01 14:10:17 +0300 |
commit | 94f494981182ef70a3d53bf0b28ef734d42ba172 (patch) | |
tree | a7813ef06029134eb25c867bcc31c530ca2dd892 /lib | |
parent | 6f1b0f223fcde837c0ebcad5b4a3260db6ddc1ac (diff) |
Use single quotes, check for exact 3 values
Signed-off-by: Patrik Kernstock <info@pkern.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/SystemStatistics.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/SystemStatistics.php b/lib/SystemStatistics.php index 1ca6a4b..e312ba3 100644 --- a/lib/SystemStatistics.php +++ b/lib/SystemStatistics.php @@ -57,7 +57,7 @@ class SystemStatistics { 'memcache.locking' => $this->config->getSystemValue('memcache.locking', 'none'), 'debug' => $this->config->getSystemValue('debug', false) ? 'yes' : 'no', 'freespace' => $this->view->free_space(), - 'cpuload' => $processorUsage["loadavg"], + 'cpuload' => $processorUsage['loadavg'], 'mem_total' => $memoryUsage['mem_total'], 'mem_free' => $memoryUsage['mem_free'] ]; @@ -105,7 +105,7 @@ class SystemStatistics { $loadavg = sys_getloadavg(); // check if we got any values back. - if (!(is_array($loadavg) && count($loadavg) <= 3)) { + if (!(is_array($loadavg) && count($loadavg) === 3)) { // either no array or too few array keys. // returning back zeroes to prevent any errors on JS side. $loadavg = [0, 0, 0]; |