changed the syntax at the end, the previous syntax would give a syntax error
git-svn-id: http://svn.automattic.com/wordpress/trunk@741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
96b3058e9f
commit
311764a02d
|
@ -54,10 +54,11 @@ $xml_parser = xml_parser_create();
|
||||||
// Set the functions to handle opening and closing tags
|
// Set the functions to handle opening and closing tags
|
||||||
xml_set_element_handler($xml_parser, "startElement", "endElement");
|
xml_set_element_handler($xml_parser, "startElement", "endElement");
|
||||||
|
|
||||||
xml_parse($xml_parser, $opml, true)
|
if (!xml_parse($xml_parser, $opml, true)) {
|
||||||
or echo(sprintf("XML error: %s at line %d",
|
echo(sprintf("XML error: %s at line %d",
|
||||||
xml_error_string(xml_get_error_code($xml_parser)),
|
xml_error_string(xml_get_error_code($xml_parser)),
|
||||||
xml_get_current_line_number($xml_parser)));
|
xml_get_current_line_number($xml_parser)));
|
||||||
|
}
|
||||||
|
|
||||||
// Free up memory used by the XML parser
|
// Free up memory used by the XML parser
|
||||||
xml_parser_free($xml_parser);
|
xml_parser_free($xml_parser);
|
||||||
|
|
Loading…
Reference in New Issue