]> source.dussan.org Git - nextcloud-server.git/commitdiff
Unset user PHOTO before setting new one in OCA\DAV\CardDAV\Converter::updateCard... 1717/head
authorOlivier Mehani <shtrom-github@ssji.net>
Thu, 29 Sep 2016 10:39:36 +0000 (20:39 +1000)
committerMorris Jobke <hey@morrisjobke.de>
Wed, 12 Oct 2016 08:49:06 +0000 (10:49 +0200)
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
#26242

apps/dav/lib/CardDAV/Converter.php

index 69c96f5ed6510125e205b5a6e98b875c2adb50ba..0f4a6fb3f08320d22c1378d85071d18b06a27298 100644 (file)
@@ -92,6 +92,7 @@ class Converter {
                }
 
                if($this->propertyNeedsUpdate($vCard, 'PHOTO', $image)) {
+                       unset($vCard->PHOTO);
                        $vCard->add('PHOTO', $image->data(), ['ENCODING' => 'b', 'TYPE' => $image->mimeType()]);
                        $updated = true;
                }