From 047f3485699d386a51c42f1f29290480a9603157 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 3 Mar 2020 22:41:17 +0100 Subject: [PATCH] fix type bug --- Models/TaskElement.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Models/TaskElement.php b/Models/TaskElement.php index f0a00ea..1907292 100644 --- a/Models/TaskElement.php +++ b/Models/TaskElement.php @@ -357,7 +357,7 @@ class TaskElement implements \JsonSerializable { foreach ($this->accRelation as $acc) { if (($acc->getDuty() === DutyType::TO - && ($acc->getRelation() instanceof AccountRelation) && $acc->getRelation()->getId() === $id) + && ($acc->getRelation() instanceof Account) && $acc->getRelation()->getId() === $id) || ($acc->getDuty() === DutyType::TO && $acc->getRelation() === $id) ) { @@ -381,7 +381,7 @@ class TaskElement implements \JsonSerializable { foreach ($this->grpRelation as $grp) { if (($grp->getDuty() === DutyType::TO - && ($grp->getRelation() instanceof GroupRelation) && $grp->getRelation()->getId() === $id) + && ($grp->getRelation() instanceof Group) && $grp->getRelation()->getId() === $id) || ($grp->getDuty() === DutyType::TO && $grp->getRelation() === $id) ) { @@ -405,7 +405,7 @@ class TaskElement implements \JsonSerializable { foreach ($this->accRelation as $acc) { if (($acc->getDuty() === DutyType::CC - && ($acc->getRelation() instanceof AccountRelation) && $acc->getRelation()->getId() === $id) + && ($acc->getRelation() instanceof Account) && $acc->getRelation()->getId() === $id) || ($acc->getDuty() === DutyType::CC && $acc->getRelation() === $id) ) { @@ -429,7 +429,7 @@ class TaskElement implements \JsonSerializable { foreach ($this->grpRelation as $grp) { if (($grp->getDuty() === DutyType::CC - && ($grp->getRelation() instanceof GroupRelation) && $grp->getRelation()->getId() === $id) + && ($grp->getRelation() instanceof Group) && $grp->getRelation()->getId() === $id) || ($grp->getDuty() === DutyType::CC && $grp->getRelation() === $id) ) {