changed the syntax at the end, the previous syntax would give a syntax error
git-svn-id: https://develop.svn.wordpress.org/trunk@741 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c4030f4b8f
commit
c70e0c8a4c
@ -54,10 +54,11 @@ $xml_parser = xml_parser_create();
|
||||
// Set the functions to handle opening and closing tags
|
||||
xml_set_element_handler($xml_parser, "startElement", "endElement");
|
||||
|
||||
xml_parse($xml_parser, $opml, true)
|
||||
or echo(sprintf("XML error: %s at line %d",
|
||||
if (!xml_parse($xml_parser, $opml, true)) {
|
||||
echo(sprintf("XML error: %s at line %d",
|
||||
xml_error_string(xml_get_error_code($xml_parser)),
|
||||
xml_get_current_line_number($xml_parser)));
|
||||
}
|
||||
|
||||
// Free up memory used by the XML parser
|
||||
xml_parser_free($xml_parser);
|
||||
|
Loading…
x
Reference in New Issue
Block a user