diff --git a/.changes/unreleased/Fixed-20250619-170142.yaml b/.changes/unreleased/Fixed-20250619-170142.yaml new file mode 100644 index 000000000..d9ee78e1b --- /dev/null +++ b/.changes/unreleased/Fixed-20250619-170142.yaml @@ -0,0 +1,7 @@ +kind: Fixed +body: | + Allow null and cast as string to setContent method for NewsItem +time: 2025-06-19T17:01:42.125730402+02:00 +custom: + Issue: "392" + SchemaChange: No schema change diff --git a/src/Bundle/ChillMainBundle/Entity/NewsItem.php b/src/Bundle/ChillMainBundle/Entity/NewsItem.php index 7acf2de86..371cc7f15 100644 --- a/src/Bundle/ChillMainBundle/Entity/NewsItem.php +++ b/src/Bundle/ChillMainBundle/Entity/NewsItem.php @@ -70,9 +70,9 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface return $this->content; } - public function setContent(string $content): void + public function setContent(string|null $content): void { - $this->content = $content; + $this->content = (string) $content; } public function getStartDate(): ?\DateTimeImmutable