rapidwebltd / php-google-people-api

👥 This package provides a user friendly way of interacting with Google Contacts via the Google People API.
GNU Lesser General Public License v3.0
99 stars 39 forks source link

show error on $connections #47

Open AgungPutra0708 opened 9 months ago

AgungPutra0708 commented 9 months ago

foreach ($people->all() as $contact) { // echo $contact->resourceName . ' - '; if ($contact->names) { echo $contact->names[0]->displayName . "\n"; $contact->delete(); } // echo PHP_EOL; }

when $people is null thats show error like this Warning: Undefined property: stdClass::$connections in C:\xampp\htdocs\phpto\vendor\rapidwebltd\php-google-people-api\src\GooglePeople.php on line 70 PHP Warning: foreach() argument must be of type array|object, null given in C:\xampp\htdocs\phpto\vendor\rapidwebltd\php-google-people-api\src\GooglePeople.php on line 70