diff options
Diffstat (limited to 'libs/ping.php')
-rw-r--r-- | libs/ping.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ping.php b/libs/ping.php index 1cadb70..9ea0ec8 100644 --- a/libs/ping.php +++ b/libs/ping.php @@ -14,6 +14,11 @@ foreach ($hosts as $host) { exec('/bin/ping -qc 1 '.$host.' | awk -F/ \'/^rtt/ { print $5 }\'', $result); + if (!isset($result[0])) + { + $result[0] = 0; + } + $datas[] = array( 'host' => $host, 'ping' => $result[0], |