diff --git a/app/External/Google/GroupApi.php b/app/External/Google/GroupApi.php index 4eb644b7..495cfa82 100644 --- a/app/External/Google/GroupApi.php +++ b/app/External/Google/GroupApi.php @@ -95,6 +95,14 @@ public function list(?ApiProgress $apiProgress = null) ]); }, $apiProgress) ->filter(function($group) { + if(! is_array($group)) { // Groups with no members come back as just a string? + return false; + } + + if(! array_key_exists('type', $group)) { + return false; + } + return $group['type'] != 'CUSTOMER'; // No email key for this entry type }) ->map(function ($group) {