Skip to content

Commit

Permalink
Merge pull request #1738 from nextcloud/backport/1736/stable28
Browse files Browse the repository at this point in the history
[stable28] fix toArray on null
  • Loading branch information
ArtificialOwl authored Nov 1, 2024
2 parents a16c591 + 6c039fa commit 1b900c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Model/ShareWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,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(),
Expand Down

0 comments on commit 1b900c9

Please sign in to comment.