Skip to content

Commit

Permalink
Merge pull request #1740 from nextcloud/backport/1736/stable30
Browse files Browse the repository at this point in the history
[stable30] fix toArray on null
  • Loading branch information
ArtificialOwl authored Nov 1, 2024
2 parents 61b63b0 + 5f761cc commit 9f53433
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 @@ -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(),
Expand Down

0 comments on commit 9f53433

Please sign in to comment.