Development

#3095 (createFromWeb() doesn't check for well-formed XML)

You must first sign up to be able to contribute.

Ticket #3095 (new defect)

Opened 6 months ago

createFromWeb() doesn't check for well-formed XML

Reported by: garak Assigned to: francois
Priority: minor Milestone:
Component: sfFeed2Plugin Version: 1.0.10
Keywords: Cc:
Qualification: Unreviewed

Description

In sfFeedPeer.class.php at line 72, it's not checked if simplexml_load_string() returns false. So, line 72 can raise a Fatal error: Call to a member function getNamespaces() on a non-object. IMHO, a check is needed after line 72, like so:

if (false === $feedXML)
{
  return false;
}

and of course @return value in phpdoc comment should be adapted