diff --git a/src/Objects/Calendar/Event.php b/src/Objects/Calendar/Event.php index 96153a6..179237d 100644 --- a/src/Objects/Calendar/Event.php +++ b/src/Objects/Calendar/Event.php @@ -94,7 +94,7 @@ public function tags(array $query = []): ClientResponse private function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Calendar/EventInstance.php b/src/Objects/Calendar/EventInstance.php index df09c47..2e887b1 100644 --- a/src/Objects/Calendar/EventInstance.php +++ b/src/Objects/Calendar/EventInstance.php @@ -87,7 +87,7 @@ public function get(array $query = []): ClientResponse private function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Calendar/Tag.php b/src/Objects/Calendar/Tag.php index 19cd9c0..e74c2c0 100644 --- a/src/Objects/Calendar/Tag.php +++ b/src/Objects/Calendar/Tag.php @@ -46,7 +46,7 @@ public function all(array $query = []): ClientResponse /** @internal */ public function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Calendar/TagGroup.php b/src/Objects/Calendar/TagGroup.php index a3a7da6..d00ff0c 100644 --- a/src/Objects/Calendar/TagGroup.php +++ b/src/Objects/Calendar/TagGroup.php @@ -53,7 +53,7 @@ public function tags(array $query = []): ClientResponse private function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Groups/Event.php b/src/Objects/Groups/Event.php index baf1729..64ef786 100644 --- a/src/Objects/Groups/Event.php +++ b/src/Objects/Groups/Event.php @@ -63,7 +63,7 @@ public function get(array $query = []): ClientResponse private function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Groups/Group.php b/src/Objects/Groups/Group.php index 89162f3..927fb35 100644 --- a/src/Objects/Groups/Group.php +++ b/src/Objects/Groups/Group.php @@ -106,7 +106,7 @@ public function tags(array $query = []): ClientResponse protected function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Groups/GroupEnrollment.php b/src/Objects/Groups/GroupEnrollment.php index ba43727..1f16fc2 100644 --- a/src/Objects/Groups/GroupEnrollment.php +++ b/src/Objects/Groups/GroupEnrollment.php @@ -49,7 +49,7 @@ public function get(array $query = []): ClientResponse protected function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Groups/GroupMemberPerson.php b/src/Objects/Groups/GroupMemberPerson.php index 3b3db19..4c6b5f5 100644 --- a/src/Objects/Groups/GroupMemberPerson.php +++ b/src/Objects/Groups/GroupMemberPerson.php @@ -50,7 +50,7 @@ public function get(array $query = []): ClientResponse protected function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Groups/GroupMembership.php b/src/Objects/Groups/GroupMembership.php index da08616..7d2e0aa 100644 --- a/src/Objects/Groups/GroupMembership.php +++ b/src/Objects/Groups/GroupMembership.php @@ -54,7 +54,7 @@ public function get(array $query = []): ClientResponse protected function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Groups/Tag.php b/src/Objects/Groups/Tag.php index bd9cdf5..2a138a6 100644 --- a/src/Objects/Groups/Tag.php +++ b/src/Objects/Groups/Tag.php @@ -56,7 +56,7 @@ public function groups(array $query = []): ClientResponse protected function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/Groups/TagGroup.php b/src/Objects/Groups/TagGroup.php index 66d4f84..e664a96 100644 --- a/src/Objects/Groups/TagGroup.php +++ b/src/Objects/Groups/TagGroup.php @@ -55,7 +55,7 @@ public function tags(array $query = []): ClientResponse protected function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/People/Email.php b/src/Objects/People/Email.php index 2313b8d..9010daf 100644 --- a/src/Objects/People/Email.php +++ b/src/Objects/People/Email.php @@ -71,7 +71,7 @@ public function update(): ClientResponse private function mapFromPco(ClientResponse $clientResponse): void { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); if (!is_iterable($records)) { return; diff --git a/src/Objects/People/Person.php b/src/Objects/People/Person.php index 168bbaa..6ba92ec 100644 --- a/src/Objects/People/Person.php +++ b/src/Objects/People/Person.php @@ -84,7 +84,7 @@ public function delete(): ClientResponse private function mapFromPco(ClientResponse $clientResponse): void { try { - $records = objectify($clientResponse->meta->response->json("data")); + $records = objectify($clientResponse->meta->response->json("data", [])); } catch (Exception|TypeError) { return; }