Skip to content

[Config] ArrayNode::addChild() - $node->getName() can't be 0 #7243

@ManInTheBox

Description

@ManInTheBox

Node name (array key) cannot be 0

# bundle.yml
bundle:
    0: # won't work
        something: else
    1:
        this: works
$name = $node->getName();
if (empty($name)) { // problem is here
    throw new \InvalidArgumentException('Child nodes must be named.');
}

Easy fix will be something like if (!strlen($name)).
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions