From 65ebcd52c820bdee36547e7d9325ff73235fe11c Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Thu, 31 Oct 2024 20:46:56 -0100 Subject: [PATCH] fix toArray on null Signed-off-by: Maxence Lange --- lib/Model/ShareWrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Model/ShareWrapper.php b/lib/Model/ShareWrapper.php index 5ac33d322..52b791f91 100644 --- a/lib/Model/ShareWrapper.php +++ b/lib/Model/ShareWrapper.php @@ -612,7 +612,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(),