- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Sun, 04 Jan 2009 10:54:11 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv28089/httpd/cgi-bin Modified Files: check Log Message: Improve handling of messages with no line/col locators (such as some info ones from validator.nu). Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.614 retrieving revision 1.615 diff -u -d -r1.614 -r1.615 --- check 4 Jan 2009 10:43:50 -0000 1.614 +++ check 4 Jan 2009 10:54:09 -0000 1.615 @@ -1841,11 +1841,11 @@ foreach my $err (@{$File->{Errors}}) { my $line; my $col; - if ($err->{char} =~ /^[0-9]+$/ ){ + if (defined($err->{char}) && $err->{char} =~ /^[0-9]+$/ ){ ($line, $col) = &truncate_line($File->{Content}->[$err->{line}-1], $err->{char}); $line = &mark_error($line, $col); } - else { + elsif (defined($err->{line})) { $col = length($File->{Content}->[$err->{line}-1]); $col = 80 if ($col > 80); ($line, $col) = &truncate_line($File->{Content}->[$err->{line}-1], $col);
Received on Sunday, 4 January 2009 10:54:20 UTC