We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a20439e commit 1bb17bbCopy full SHA for 1bb17bb
src/SWP/Bundle/ContentBundle/Model/Article.php
@@ -538,8 +538,11 @@ public function setExtraFields(array $extra): void
538
if (is_array($value)) {
539
$this->addEmbedExtra(ArticleExtraEmbedField::newFromValue($key, $value));
540
} else {
541
- if(is_int($value)) {
542
- $value = (string)$value;
+ // Coerce null and non-string scalars to string to satisfy strict types
+ if ($value === null) {
543
+ $value = '';
544
+ } elseif (!is_string($value)) {
545
+ $value = (string) $value;
546
}
547
$this->addTextExtra(ArticleExtraTextField::newFromValue($key, $value));
548
0 commit comments