From 6b57ddac004674b2e7f5afe6a3da60806ef8d031 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 15 Oct 2020 13:02:32 +0200 Subject: [PATCH] only save sharing information if its given, eg. not the case for CardDAV --- api/src/Contacts/Sql.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/Contacts/Sql.php b/api/src/Contacts/Sql.php index e98add9810..11c1c98254 100644 --- a/api/src/Contacts/Sql.php +++ b/api/src/Contacts/Sql.php @@ -1164,10 +1164,10 @@ class Sql extends Api\Storage { parent::update($update); } - // save sharing information - if (!$err) + // save sharing information, if given, eg. not the case for CardDAV + if (!$err && isset($this->data['shared'])) { - $this->data['shared'] = $this->save_shared($this->data['id'], (array)$this->data['shared']); + $this->data['shared'] = $this->save_shared($this->data['id'], $this->data['shared']); } return $err; }