fix activity entity addPersons if person is null

This commit is contained in:
Mathieu Jaumotte 2021-06-03 13:48:03 +02:00
parent c4e226d0bd
commit 32b3d74a1b

View File

@ -400,9 +400,11 @@ class Activity implements HasCenterInterface, HasScopeInterface
/**
* Add a person to the person list
*/
public function addPerson(Person $person): self
public function addPerson(?Person $person): self
{
$this->persons[] = $person;
if (null !== $person) {
$this->persons[] = $person;
}
return $this;
}