Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.4

Request #4774 XML_Parser shoud report source column number on errors
Submitted: 2005-07-09 03:22 UTC Modified: 2005-09-23 06:51 UTC
From: hartmut at php dot net Assigned: schst
Status: Closed Package: XML_Parser
PHP Version: Irrelevant OS: any
Roadmaps: (Not assigned)    
Subscription  


 [2005-07-09 03:22 UTC] hartmut at php dot net
Description: ------------ Error messages produced by XML_Parser should not only show the line number but also the column position within that line (especially as some XML generating tools seem to hate newlines, producing output that is stuffed into a loooooong single line) Reproduce code: --------------- diff -u -r1.25 Parser.php --- Parser.php 25 Mar 2005 17:13:10 -0000 1.25 +++ Parser.php 9 Jul 2005 08:21:10 -0000 @@ -673,12 +673,14 @@ { if (is_resource($msgorparser)) { $code = xml_get_error_code($msgorparser); - $msgorparser = sprintf('%s at XML input line %d', + $msgorparser = sprintf('%s at XML input line %d:%d', xml_error_string($code), - xml_get_current_line_number($msgorparser)); + xml_get_current_line_number($msgorparser), + xml_get_current_column_number($msgorparser)); } $this->PEAR_Error($msgorparser, $code, $mode, $level); } // }}} }

Comments

 [2005-09-23 06:51 UTC] schst
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.