diff --git a/src/GooglePeople.php b/src/GooglePeople.php index 05a6080..38a294d 100644 --- a/src/GooglePeople.php +++ b/src/GooglePeople.php @@ -65,6 +65,10 @@ public function all() $responseObj = json_decode($body); + if (empty($responseObj->connections) || ! is_array($responseObj->connections)) { + return []; + } + $contacts = []; foreach($responseObj->connections as $connection) {