Use exception for number formating in API only if the value returned by FTL is non-numeric (e.g. "N/A")

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2017-10-06 17:51:19 +02:00
parent 3df3c5b29c
commit 2ade58322d

View File

@@ -32,7 +32,7 @@ if (isset($_GET['summary']) || isset($_GET['summaryRaw']) || !count($_GET))
{
$tmp = explode(" ",$line);
if($tmp[0] === "domains_being_blocked" || $tmp[0] === "status")
if(($tmp[0] === "domains_being_blocked" && !is_numeric($tmp[1])) || $tmp[0] === "status")
{
$stats[$tmp[0]] = $tmp[1];
continue;