Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicated keys in nested XML arrays (#525) #2428

Closed
wants to merge 1 commit into from

Conversation

z38
Copy link
Contributor

@z38 z38 commented Jan 19, 2017

At the moment nested arrays in XML configuration files are parsed incorrectly because DOMElement::getElementsByTagName not only returns immediate children but all descendants.

Example:

<array>
    <element key="a">
        <array>
            <element key="b">
                <string>foo</string>
            </element>
        </array>
    </element>
    <element key="c">
        <string>bar</string>
    </element>
</array>
array (
  'a' => array (
    'b' => 'foo',
  ),
  'b' => 'foo', // duplicated
  'c' => 'bar',
)

@sebastianbergmann
Copy link
Owner

Cherry-picked into 4.8 and merged from there. Thanks!

@sebastianbergmann sebastianbergmann added the type/bug Something is broken label Jan 19, 2017
@z38 z38 deleted the fix-nested-array branch January 19, 2017 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants