From 020b144ed1d87caad8c70a8264facdff14bcb575 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Wed, 22 Aug 2012 09:06:40 +0000 Subject: [PATCH] Fix #1286 --- src/rawstat.daily | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rawstat.daily b/src/rawstat.daily index 018e45f8..4d7415fa 100644 --- a/src/rawstat.daily +++ b/src/rawstat.daily @@ -95,7 +95,7 @@ while ($line = fgets($apache_log_file)) { //assume that hostname is at end of line and separated with a space $host = substr($line, strrpos($line, ' ')+1, -1); - if (is_null($hosts[$host])) { + if (isset($hosts[$host]) && is_null($hosts[$host])) { unset($hosts[$host]); $nolog_hosts[$host]=''; continue; @@ -115,7 +115,7 @@ while ($line = fgets($apache_log_file)) { $pos = false; break; } - if (is_null($hosts[$parent_host])) { + if (isset($hosts[$parent_host]) && is_null($hosts[$parent_host])) { unset($hosts[$parent_host]); $nolog_hosts[$parent_host]=''; $pos = false;