Skip to content

Commit

Permalink
Fix fatal error in API for private attachments
Browse files Browse the repository at this point in the history
(fix #1290)
  • Loading branch information
zerocrates committed Sep 11, 2018
1 parent a1c0d4a commit aa6ad3f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ public function __construct(SiteBlockAttachment $attachment, ServiceLocatorInter

public function jsonSerialize()
{
$item = $this->item();
$media = $this->media();
return [
'o:item' => $this->item()->getReference(),
'o:item' => $item ? $item->getReference() : null,
'o:media' => $media ? $media->getReference() : null,
'o:caption' => $this->caption(),
];
Expand Down

0 comments on commit aa6ad3f

Please sign in to comment.