diff --git a/src/Bundle/ChillMainBundle/Entity/Embeddable/PrivateCommentEmbeddable.php b/src/Bundle/ChillMainBundle/Entity/Embeddable/PrivateCommentEmbeddable.php index 09a35324e..00e0f29d7 100644 --- a/src/Bundle/ChillMainBundle/Entity/Embeddable/PrivateCommentEmbeddable.php +++ b/src/Bundle/ChillMainBundle/Entity/Embeddable/PrivateCommentEmbeddable.php @@ -54,9 +54,9 @@ class PrivateCommentEmbeddable return $this; } - public function setCommentForUser(User $user, string $content): self + public function setCommentForUser(User $user, ?string $content): self { - $this->comments[$user->getId()] = trim($content); + $this->comments[$user->getId()] = trim((string) $content); return $this; }