Skip to content

Commit 77df7ea

Browse files
authored
Merge pull request #11 from typhonius/fix-zone-id-verification
Changes sizeof check to throw an error if no zone id is found.
2 parents ebe2a98 + 9939afd commit 77df7ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Endpoints/Zones.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function getZoneID(string $name = ""): string
9696
{
9797
$zones = $this->listZones($name);
9898

99-
if (sizeof($zones) < 1) {
99+
if (sizeof($zones->result) < 1) {
100100
throw new EndpointException("Could not find zones with specified name.");
101101
}
102102

@@ -142,4 +142,4 @@ public function cachePurge(string $zoneID, array $files = [], array $tags = []):
142142

143143
return false;
144144
}
145-
}
145+
}

0 commit comments

Comments
 (0)