From 7badab41ca48b2705426907d533aca374ba6401f Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Mon, 9 Sep 2019 21:21:09 +0200 Subject: [PATCH] Fixed getcontenttype being null --- lib/CardDAV/Plugin.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/CardDAV/Plugin.php b/lib/CardDAV/Plugin.php index 17d793e82a..10398a4d28 100644 --- a/lib/CardDAV/Plugin.php +++ b/lib/CardDAV/Plugin.php @@ -686,9 +686,11 @@ public function propFindLate(DAV\PropFind $propFind, DAV\INode $node) return; } $contentType = $propFind->get('{DAV:}getcontenttype'); - list($part) = explode(';', $contentType); - if ('text/x-vcard' === $part || 'text/vcard' === $part) { - $propFind->set('{DAV:}getcontenttype', 'text/x-vcard'); + if (null !== $contentType) { + list($part) = explode(';', $contentType); + if ('text/x-vcard' === $part || 'text/vcard' === $part) { + $propFind->set('{DAV:}getcontenttype', 'text/x-vcard'); + } } }