-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report
Description
The bug is in the call to:
$source->children()
If an XML node has no child nodes and no attributes, this resolves to FALSE
However, if the XML node has no children and has one or more attributes it resolves to TRUE when clearly it should not.
See the line of code in question:
https://github.com/magento/magento2/blob/develop/lib/internal/Magento/Framework/Simplexml/Element.php#L329
This line needs to be changed to
if(count($source->children())) {
Please see this Gist
https://gist.github.com/tim-reynolds/ac20289acdcfcde3633f
The bug exists in Magento 1.X as well as 2.0.
I would really blame PHP SimpleXMLElement but we can't readily fix that.
Metadata
Metadata
Assignees
Labels
Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report