Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Rebased and cleaned up #6279 #6879

Merged
merged 3 commits into from
Nov 17, 2014
Merged

Conversation

adamlundrigan
Copy link
Contributor

Issue summary

In Zend\Config\Reader\Xml, loading an XML file with elements having both attributes and a node value the node value is lost:

Loading this XML file:

<?xml version="1.0"?>
<config>
    <one foo="bar">bazbat</one>
</config>

Would result in an array like this:

array(1) {
  'one' =>
  array(2) {
    [0] =>
    array(2) {
      'foo' =>
      string(3) "bar"
    }
  }
}

Fix

If an element has attributes then read the node value and place it in the special array key _

Ack

Fix contributed by @catalint

catalint and others added 3 commits November 15, 2014 10:39
If element has attributes & string value until now the string value was ignored & lost, I added the _ index so that it also returns the string value along with the attribute names
@Ocramius Ocramius self-assigned this Nov 17, 2014
@Ocramius Ocramius added this to the 2.3.4 milestone Nov 17, 2014
Ocramius added a commit that referenced this pull request Nov 17, 2014
Ocramius added a commit that referenced this pull request Nov 17, 2014
…nflict' into develop

Close #6279
Close #6879
Forward port #6279
Forward port #6879
@Ocramius Ocramius merged commit 70a7d26 into zendframework:master Nov 17, 2014
Ocramius added a commit that referenced this pull request Nov 17, 2014
@Ocramius
Copy link
Member

Manually merged, thanks!

master: 70a7d26
develop: b4f6735

gianarb pushed a commit to zendframework/zend-config that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-config that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-config that referenced this pull request May 15, 2015
boesing pushed a commit to laminas/laminas-cache-storage-adapter-apc that referenced this pull request May 24, 2020
boesing pushed a commit to laminas/laminas-cache-storage-adapter-memcached that referenced this pull request Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants