mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
fix activity entity addPersons if person is null
This commit is contained in:
parent
c4e226d0bd
commit
32b3d74a1b
@ -400,9 +400,11 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
|||||||
/**
|
/**
|
||||||
* Add a person to the person list
|
* 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;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user