- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 14 Dec 2009 22:19:11 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv15465/httpd/cgi-bin Modified Files: check Log Message: Don't lose XML::LibXML errors in "structured error" mode. $err->_prev() was called one time too many per iteration while traversing the chain. Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.755 retrieving revision 1.756 diff -u -d -r1.755 -r1.756 --- check 14 Dec 2009 22:09:17 -0000 1.755 +++ check 14 Dec 2009 22:19:09 -0000 1.756 @@ -641,20 +641,15 @@ $xml_string = undef; my $xml_parse_errors_line = undef; my @xmlwf_error_list; - my @xmlwf_obj_error_list; if (ref($@)) { # handle a structured error (XML::LibXML::Error object) # (lib XML::LibXML > 0.66, but will work MUCH better > 0.69 ) - push(@xmlwf_obj_error_list, $@); + my $err_obj = $@; - while ($err_obj->_prev()) { - $err_obj = $err_obj->_prev(); - unshift(@xmlwf_obj_error_list, $err_obj); - } my $num_xmlwf_error = 0; - foreach my $err_obj (@xmlwf_obj_error_list) { + while ($err_obj) { my $err; $err->{src} = '...'; # do this with show_open_entities()? $err->{line} = $err_obj->line(); @@ -674,8 +669,10 @@ $err = undef; next; } - push(@xmlwf_error_list, $err); + + unshift(@xmlwf_error_list, $err); $num_xmlwf_error++; + $err_obj = $err_obj->_prev(); } } elsif ($@) {
Received on Monday, 14 December 2009 22:19:20 UTC