From 8cf08f66d5e39fdfb099472b5f0ac96375232f36 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 16 Dec 2021 10:41:51 +0100 Subject: [PATCH] Fix bug in singleTaskController --- .../ChillTaskBundle/Controller/SingleTaskController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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',