diff --git a/lib/Model/ShareWrapper.php b/lib/Model/ShareWrapper.php index cf73ea08d..3479bdd8e 100644 --- a/lib/Model/ShareWrapper.php +++ b/lib/Model/ShareWrapper.php @@ -592,7 +592,7 @@ public function jsonSerialize(): array { 'shareType' => $this->getShareType(), 'providerId' => $this->getProviderId(), 'permissions' => $this->getPermissions(), - 'attributes' => json_encode($this->getAttributes()->toArray()), + 'attributes' => ($this->getAttributes() !== null) ? json_encode($this->getAttributes()->toArray()) : null, 'hideDownload' => $this->getHideDownload(), 'itemType' => $this->getItemType(), 'itemSource' => $this->getItemSource(),