From 9939afd0b6ec57023fce156a612c4700237641d7 Mon Sep 17 00:00:00 2001 From: Adam Malone Date: Fri, 22 Sep 2017 02:53:25 +1000 Subject: [PATCH] Changes sizeof check to throw an error if no zone id is found. --- src/Endpoints/Zones.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Endpoints/Zones.php b/src/Endpoints/Zones.php index 13dc83b..80a2ddc 100644 --- a/src/Endpoints/Zones.php +++ b/src/Endpoints/Zones.php @@ -96,7 +96,7 @@ class Zones implements API { $zones = $this->listZones($name); - if (sizeof($zones) < 1) { + if (sizeof($zones->result) < 1) { throw new EndpointException("Could not find zones with specified name."); } @@ -142,4 +142,4 @@ class Zones implements API return false; } -} \ No newline at end of file +}