From 2ade58322ddc56a525e1f6744c8b77d1c4e00b5e Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 6 Oct 2017 17:51:19 +0200 Subject: [PATCH] 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 --- api_FTL.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api_FTL.php b/api_FTL.php index 941bdfc5..3554c4a8 100644 --- a/api_FTL.php +++ b/api_FTL.php @@ -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;