Skip to content

Commit a20439e

Browse files
committed
Cast $key as string
1 parent 7308f43 commit a20439e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/SWP/Bundle/ContentBundle/Model/Article.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,8 @@ public function setExtraFields(array $extra): void
533533
}
534534

535535
foreach ($extra as $key => $value) {
536+
// Ensure field name is always a string, even for numeric-looking keys
537+
$key = (string) $key;
536538
if (is_array($value)) {
537539
$this->addEmbedExtra(ArticleExtraEmbedField::newFromValue($key, $value));
538540
} else {

0 commit comments

Comments
 (0)