From d2ce57b48bd19ff65bf5a8fad307126e71c8a521 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 15 Jun 2019 15:58:12 +0200 Subject: [PATCH] Check IP field not entire object Signed-off-by: DL6ER --- api_db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api_db.php b/api_db.php index 90cb9218..8342b914 100644 --- a/api_db.php +++ b/api_db.php @@ -82,7 +82,7 @@ if(isset($_GET["network"]) && $auth) while($ips !== false && $ip = $ips->fetchArray(SQLITE3_ASSOC)) array_push($res["ip"],$ip["ip"]); // If the network_addresses table does not contain any IPs for this client, we use the IP stored in the network table - if(count($res) < 1) + if(count($res["ip"]) < 1) array_push($res["ip"],$resip); array_push($network, $res); }