summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr/local/www/includes/functions.inc.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php
index 4caf925..8f549d6 100644
--- a/usr/local/www/includes/functions.inc.php
+++ b/usr/local/www/includes/functions.inc.php
@@ -5,8 +5,6 @@ if(Connection_Aborted()) {
}
require_once("config.inc");
-require_once('guiconfig.inc');
-
function get_stats() {
@@ -33,6 +31,11 @@ function get_uptime() {
$boottime = $matches[1];
$uptime = time() - $boottime;
+ if(intval($boottime) == 0)
+ return;
+ if(intval($uptime) == 0)
+ return;
+
$updays = (int)($uptime / 86400);
$uptime %= 86400;
$uphours = (int)($uptime / 3600);
@@ -223,3 +226,4 @@ function get_interfacestatus(){
return $data;
}
+?> \ No newline at end of file
OpenPOWER on IntegriCloud