diff --git a/lib/Activity/ProviderParser.php b/lib/Activity/ProviderParser.php index 94dca8016..a01965dc7 100644 --- a/lib/Activity/ProviderParser.php +++ b/lib/Activity/ProviderParser.php @@ -79,9 +79,9 @@ protected function parseCircleEvent(IEvent &$event, Circle $circle, $remote, $ow 'circle' => $this->generateCircleParameter($circle) ]; - $remote = $this->generateRemoteCircleParameter($remote); - if ($remote !== null) { - $data['remote'] = $remote; + $remoteCircle = $this->generateRemoteCircleParameter($remote); + if ($remoteCircle !== null) { + $data['remote'] = $remoteCircle; } if ($this->isViewerTheAuthor($circle, $this->activityManager->getCurrentUserId())) { @@ -329,7 +329,12 @@ protected function generateCircleParameter(Circle $circle) { * * @return array */ - protected function generateRemoteCircleParameter(FederatedLink $link) { + protected function generateRemoteCircleParameter($link) { + + if ($link === null) { + return null; + } + return [ 'type' => 'circle', 'id' => $link->getUniqueId(),