ZF-11184: Zend_Feed_Reader doesn't check the feed if is empty and doesn't throw an exception if so
Description
Hello,
I noticed in case the uri passed to Zend_Feed_Reader::import($uri); is pointing to a blank page i am getting this error:
PHP Warning: DOMDocument::loadXML(): Empty string supplied as input in /path/ZendFramework-1.10.7/Zend/Feed/Reader.php on line 325
Warning: DOMDocument::loadXML(): Empty string supplied as input in /path/ZendFramework-1.10.7/Zend/Feed/Reader.php on line 325 End checking feeds
For the sake of easy to use i suggest so the Zend_Feed_Reader to check the input which is going to be passed to DOMDocument::loadXML() and in case detects empty (or maybe malformed) content to throw an error so to be easy for us to handle the situation.
I am not sure if the problem had been fixed post 1.10.7.
Comments
Posted by Cristian Bichis (avantis) on 2011-03-17T08:09:56.000+0000
I checked on 1.11.4 code and doesn't seems to be fixed.
Posted by Adam Lundrigan (adamlundrigan) on 2011-04-30T06:35:52.000+0000
Reproducing test case plus fix. Applying patch had no visible consequence w.r.t execution of test suite.
Posted by Adam Lundrigan (adamlundrigan) on 2011-04-30T06:37:39.000+0000
Fixed in trunk r23902
Posted by Ralph Schindler (ralph) on 2011-05-03T16:44:29.000+0000
Cleaned up fix in r23974 and Fixed in release branch 1.11 at r23975