From b35b0dd7a6ed642546a684801aaa8ab4f100fb95 Mon Sep 17 00:00:00 2001 From: Promofaux Date: Fri, 16 Sep 2016 23:23:54 +0100 Subject: [PATCH] Actually set status to "" before checking it! --- data.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data.php b/data.php index 47621964..f48940d1 100644 --- a/data.php +++ b/data.php @@ -128,12 +128,13 @@ $time = date_create(substr($query, 0, 16)); $exploded = explode(" ", trim($query)); $tmp = $exploded[count($exploded)-4]; + $status = ""; if (substr($tmp, 0, 5) == "query"){ $type = substr($exploded[count($exploded)-4], 6, -1); $domain = $exploded[count($exploded)-3]; $client = $exploded[count($exploded)-1]; - $status = ""; + } elseif (substr($tmp, 0, 9) == "forwarded" || $exploded[count($exploded)-3] == "pi.hole" || $exploded[count($exploded)-3] == $hostname){ $status="OK";