show error on $connections
AgungPutra0708 opened this issue · 0 comments
AgungPutra0708 commented
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