diff --git a/module/ShiftBundle/Entity/RegistrationShift.php b/module/ShiftBundle/Entity/RegistrationShift.php index 4679ad7257..bbd7d93178 100644 --- a/module/ShiftBundle/Entity/RegistrationShift.php +++ b/module/ShiftBundle/Entity/RegistrationShift.php @@ -402,7 +402,7 @@ public function canHaveAsRegistered(EntityManager $entityManager, Person $regist return false; } - if ($this->getStartDate() < $shift->getEndDate() && $shift->getStartDate() < $this->getEndDate()) { + if ($this->getStartDate() < $shift->getEndDate() && $shift->getStartDate() < $this->getEndDate() || $this->getStartDate() === $shift->getStartDate()) { return false; } diff --git a/module/ShiftBundle/Entity/Shift.php b/module/ShiftBundle/Entity/Shift.php index 27808c86eb..394829c158 100644 --- a/module/ShiftBundle/Entity/Shift.php +++ b/module/ShiftBundle/Entity/Shift.php @@ -493,7 +493,7 @@ public function canHaveAsVolunteer(EntityManager $entityManager, Person $person) return false; } - if ($this->getStartDate() < $shift->getEndDate() && $shift->getStartDate() < $this->getEndDate()) { + if ($this->getStartDate() < $shift->getEndDate() && $shift->getStartDate() < $this->getEndDate() || $shift->getStartDate() === $this->getStartDate()) { return false; } }