summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/Utils/Misc.class.php2
-rw-r--r--libs/ping.php5
2 files changed, 6 insertions, 1 deletions
diff --git a/libs/Utils/Misc.class.php b/libs/Utils/Misc.class.php
index 3fcfedb..d77bbf5 100644
--- a/libs/Utils/Misc.class.php
+++ b/libs/Utils/Misc.class.php
@@ -17,7 +17,7 @@ class Misc
break;
}
- return round($filesize, $precision).' '.$units[$idUnit].'o';
+ return round($filesize, $precision).' '.$units[$idUnit].'B';
}
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],