Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.2
-
Fix Version/s: 1.0.3
-
Component/s: Zend_Config
-
Labels:None
-
Fix Version Priority:Must Have
Description
It appears the Zend_Config_Xml class does not differ from a SimpleXMLElement that contains children vs on that does not (eg a string) when not using sections.
For instance:
$config = new Zend_Config_Xml('ourFile.xml', null);
This would load everything under the root element without the use of sections, but because of this bug, it will set any 1st level element within the root element that is a string to an empty Zend_Config object instead of a string which is expected.
<root>
<!-- Should be a string -->
<home>../application</home>
<!-- Should be another Zend_Config Object -->
<other>
<foo>bar</foo>
</other>
</root>
The following would be accessed like this:
echo $config->home; // Errors out because it contains an empty Zend_Config obj;
Attached is the patch
Assigning to
Rob Allen to initiate issue review.