diff --git a/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php b/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php index 22513580c..bc4fe9d04 100644 --- a/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php +++ b/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php @@ -590,8 +590,8 @@ final class SingleTaskController extends AbstractController { $this->denyAccessUnlessGranted(TaskVoter::SHOW, $task); - if ($person = $task->getContext() instanceof Person) { - $event = new PrivacyEvent($person, [ + if ($task->getContext() instanceof Person) { + $event = new PrivacyEvent($task->getContext(), [ 'element_class' => SingleTask::class, 'element_id' => $task->getId(), 'action' => 'show',