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

I checked on 1.11.4 code and doesn't seems to be fixed.

Reproducing test case plus fix. Applying patch had no visible consequence w.r.t execution of test suite.

Fixed in trunk r23902

Cleaned up fix in r23974 and Fixed in release branch 1.11 at r23975