This commit is contained in:
Alan Garcia 2012-08-22 09:06:40 +00:00
parent 463164fc40
commit 020b144ed1
1 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ while ($line = fgets($apache_log_file)) {
//assume that hostname is at end of line and separated with a space //assume that hostname is at end of line and separated with a space
$host = substr($line, strrpos($line, ' ')+1, -1); $host = substr($line, strrpos($line, ' ')+1, -1);
if (is_null($hosts[$host])) { if (isset($hosts[$host]) && is_null($hosts[$host])) {
unset($hosts[$host]); unset($hosts[$host]);
$nolog_hosts[$host]=''; $nolog_hosts[$host]='';
continue; continue;
@ -115,7 +115,7 @@ while ($line = fgets($apache_log_file)) {
$pos = false; $pos = false;
break; break;
} }
if (is_null($hosts[$parent_host])) { if (isset($hosts[$parent_host]) && is_null($hosts[$parent_host])) {
unset($hosts[$parent_host]); unset($hosts[$parent_host]);
$nolog_hosts[$parent_host]=''; $nolog_hosts[$parent_host]='';
$pos = false; $pos = false;