8000 bug #35537 [Config][XmlReferenceDumper] Prevent potential \TypeError … · symfony/symfony@c29989d · GitHub
[go: up one dir, main page]

Skip to content

Commit c29989d

Browse files
bug #35537 [Config][XmlReferenceDumper] Prevent potential \TypeError (fancyweb)
This PR was merged into the 4.4 branch. Discussion ---------- [Config][XmlReferenceDumper] Prevent potential \TypeError | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #34841 | License | MIT | Doc PR | - `$key` can be null and `setName()` is now typed with `string`. Fallbacking on an empty string restores the behavior (and output) of < 5.0. However, that shows that's a case we don't handle (yet) properly. But that's another task 😃 Commits ------- e8ba15e [Config][XmlReferenceDumper] Prevent potential \TypeError
2 parents 435f4d5 + e8ba15e commit c29989d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function writeNode(NodeInterface $node, int $depth = 0, bool $root = fal
9191
}
9292

9393
if ($prototype instanceof PrototypedArrayNode) {
94-
$prototype->setName($key);
94+
$prototype->setName($key ?? '');
9595
$children = [$key => $prototype];
9696
} elseif ($prototype instanceof ArrayNode) {
9797
$children = $prototype->getChildren();

0 commit comments

Comments
 (0)
0