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:
michelvaldrighi 2004-01-09 00:43:16 +00:00
parent 96b3058e9f
commit 311764a02d

View File

@ -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);