mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 11:19:59 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user