From 08e6f5306ea22871a84711fc27d4c7752c61e92f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 2 Apr 2015 19:00:08 +0000 Subject: [PATCH] Remove unnecessary `echo()`, add translator comment. props ramiy. fixes #31873. git-svn-id: https://develop.svn.wordpress.org/trunk@31986 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/link-parse-opml.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/link-parse-opml.php b/src/wp-admin/link-parse-opml.php index 6197281d86..c1c5e3a33b 100644 --- a/src/wp-admin/link-parse-opml.php +++ b/src/wp-admin/link-parse-opml.php @@ -74,10 +74,13 @@ $xml_parser = xml_parser_create(); // Set the functions to handle opening and closing tags xml_set_element_handler($xml_parser, "startElement", "endElement"); -if (!xml_parse($xml_parser, $opml, true)) { - echo(sprintf(__('XML error: %1$s at line %2$s'), - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser))); +if ( ! xml_parse( $xml_parser, $opml, true ) ) { + printf( + /* translators: 1: error message, 2: line number */ + __( 'XML Error: %1$s at line %2$s' ), + xml_error_string( xml_get_error_code( $xml_parser ) ), + xml_get_current_line_number( $xml_parser ) + ); } // Free up memory used by the XML parser