From 679d19e2a13a2b66155273a6cfa7eaf4b673096d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 30 May 2022 10:01:27 +0200 Subject: [PATCH] allow null values for private comment --- .../Entity/Embeddable/PrivateCommentEmbeddable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }