mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
fix form and take null cases into account
This commit is contained in:
@@ -51,7 +51,10 @@ class PrivateCommentEmbeddable
|
||||
|
||||
public function merge(PrivateCommentEmbeddable $newComment): self
|
||||
{
|
||||
$mergedComments = $newComment->getComments() + $this->getComments();
|
||||
|
||||
$currentComments = null === $this->getComments() ? [] : $this->getComments();
|
||||
|
||||
$mergedComments = $newComment->getComments() + $currentComments;
|
||||
|
||||
$this->setComments($mergedComments);
|
||||
|
||||
|
Reference in New Issue
Block a user