ZF-3578: Zend_Config_Xml throws warnings when loading of xml file was NOT successfull
Description
In the __construct() of Zend_Config_Xml, the function simplexml_load_file() is used for loading the xml file. But there is not checked if loading of the file was successfull, which causes multiple PHP warning to be thrown.
It would be nice/better to just throw an Exception when loading of the XML file was not-successfull. Something like the following would do the job:
$config = @simplexml_load_file($filename);
if (false === $config) {
throw new Zend_Config_Exception('File could not be loaded');
}
Comments
Posted by julien PAULI (doctorrock83) on 2008-07-16T15:34:39.000+0000
fixed at r10147
Posted by Wil Sinclair (wil) on 2008-09-02T10:39:42.000+0000
Updating for the 1.6.0 release.