ZF-11184: Zend_Feed_Reader doesn't check the feed if is empty and doesn't throw an exception if so

Issue Type: Bug Created: 2011-03-17T07:55:33.000+0000 Last Updated: 2011-05-03T16:44:29.000+0000 Status: Resolved Fix version(s): - 1.11.6 (05/May/11)

Reporter: Cristian Bichis (avantis) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Feed_Reader

Related issues: Attachments: - ZF-11184.patch



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.


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

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.