diff --git a/app/Domains/Contact/Dav/Importer.php b/app/Domains/Contact/Dav/Importer.php index 888363ebaf4..44aef0d6014 100644 --- a/app/Domains/Contact/Dav/Importer.php +++ b/app/Domains/Contact/Dav/Importer.php @@ -93,13 +93,11 @@ protected function kind(VCard $entry): string if ($kind === null) { $kinds = $entry->select('X-ADDRESSBOOKSERVER-KIND'); - if ($kinds !== null && count($kinds) > 0) { + if (! empty($kinds)) { $kind = $kinds[0]; } } - return $kind === null - ? 'individual' - : $kind->getValue(); + return optional($kind)->getValue() ?? 'individual'; } }