diff --git a/app/system/resources/dashboard/system_cpu_status.php b/app/system/resources/dashboard/system_cpu_status.php
index 8f905e69bc..019ca0f309 100644
--- a/app/system/resources/dashboard/system_cpu_status.php
+++ b/app/system/resources/dashboard/system_cpu_status.php
@@ -38,7 +38,7 @@
if (is_numeric($value)) { $percent_cpu = $percent_cpu + $value; }
}
if (stristr(PHP_OS, 'BSD')) {
- $result = trim(shell_exec("dmesg | grep -i --max-count 1 CPUs | sed 's/[^0-9]*//g'"));
+ $result = system("dmesg | grep -i --max-count 1 CPUs | sed 's/[^0-9]*//g'");
$cpu_cores = trim($result);
}
if (stristr(PHP_OS, 'Linux')) {
@@ -124,7 +124,7 @@
echo "\n";
if (PHP_OS == 'FreeBSD' || PHP_OS == 'Linux') {
- if ($percent_cpu != '') {
+ if (!empty($percent_cpu)) {
echo "
\n";
echo "| ".$text['label-cpu_usage']." | \n";
echo "".$percent_cpu."% | \n";
@@ -132,7 +132,7 @@
$c = ($c) ? 0 : 1;
}
- if ($cpu_cores != '') {
+ if (!empty($cpu_cores)) {
echo "
\n";
echo "| ".$text['label-cpu_cores']." | \n";
echo "".$cpu_cores." | \n";
diff --git a/app/system/resources/dashboard/system_status.php b/app/system/resources/dashboard/system_status.php
index 0760f25719..abe5e483c3 100644
--- a/app/system/resources/dashboard/system_status.php
+++ b/app/system/resources/dashboard/system_status.php
@@ -205,7 +205,7 @@
$tmp = event_socket_request($fp, 'api status');
$matches = Array();
preg_match("/(\d+)\s+session\(s\)\s+\-\speak/", $tmp, $matches);
- $channels = $matches[1] ? $matches[1] : 0;
+ $channels = !empty($matches[1]) ? $matches[1] : 0;
$tr_link = "href='".PROJECT_PATH."/app/calls_active/calls_active.php'";
echo "
\n";
echo "| ".$text['label-channels']." | \n";