Fix bug in singleTaskController

This commit is contained in:
Julie Lenaerts 2021-12-16 10:41:51 +01:00
parent b7c0548212
commit 8cf08f66d5

View File

@ -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',