Closed benr77 closed 7 years ago
Hello,
Which version are you using ? I don't get how this error can occur with the current code.
I'm using version 1.4.0.
OK, now I get it.
It's line 212 not 21 :-)
The fact that FeedReader tries to create a SimpleXmlElement with a non-existent feed is a bug. Can you give the feed's URL please ? I'll give it a try.
Yes, exactly. There's no error checking on the SimpleXmlElement statement. I also think that there is a very specific way of catching SimpleXml errors - the PHP web site has details.
Anyway, all I did was disable my network connection and do some development offline - so presumably you can reproduce by specifying a feed with zero length content (i.e. a blank file) or perhaps simply a non-existent URL. Of course both scenarios will need to be handled.
Thanks
Here is the info about suppressing SimpleXML errors and handling them
This issue is no longer accurate, I close it
What is the best way to catch errors etc? I'm using Symfony2.
When I try and fetch a non-existent feed I get
Warning: SimpleXMLElement::__construct(): Entity: line 11: parser error : xmlParseEntityRef: no name in /home/chaletops/dev/vendor/debril/rss-atom-bundle/Debril/RssAtomBundle/Protocol/FeedReader.php line 21
Thanks