This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6524 - "Use of uninitialized value / substr outside of string" errors filling server logs
Summary: "Use of uninitialized value / substr outside of string" errors filling server...
Status: RESOLVED FIXED
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.8.4
Hardware: All All
: P2 major
Target Milestone: 0.8.5
Assignee: Olivier Thereaux
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-03 00:16 UTC by Olivier Thereaux
Modified: 2009-03-13 14:51 UTC (History)
0 users

See Also:


Attachments

Description Olivier Thereaux 2009-02-03 00:16:29 UTC
The following errors are not critical to the function of the validator, but cause countless lines of error output to apache's error log. They should be fixed/muted.

# cat error.log | grep "[error]" | sed 's/.*client.*] //' | sed 's|, referer: http://validator.w3.org/||' | head -100000 | sort | uniq -c | sort -nr | head

  63640 check: Use of uninitialized value $line in length at /usr/local/validator/httpd/cgi-bin/check line 1720.
  26691 check: Use of uninitialized value $line in length at /usr/local/validator/httpd/cgi-bin/check line 1727.
   1735 check: substr outside of string at /usr/local/validator/httpd/cgi-bin/check line 2040.
   1735 check: substr outside of string at /usr/local/validator/httpd/cgi-bin/check line 2016.
   1590 check: Use of uninitialized value $line in length at /usr/local/validator/httpd/cgi-bin/check line 1739.
   1531 check: Use of uninitialized value $line in substr at /usr/local/validator/httpd/cgi-bin/check line 1739.
    952 File does not exist: /usr/local/validator/htdocs/favicon.ico
    171 check: Use of uninitialized value $line in substr at /usr/local/validator/httpd/cgi-bin/check line 1747.
    171 check: substr outside of string at /usr/local/validator/httpd/cgi-bin/check line 1742.
    170 check: Use of uninitialized value $line in length at /usr/local/validator/httpd/cgi-bin/check line 1724.

Line numbers relevant only to 0.8.4 release
Comment 1 Olivier Thereaux 2009-02-03 00:43:40 UTC
(In reply to comment #0)
>   63640 check: Use of uninitialized value $line in length at
> /usr/local/validator/httpd/cgi-bin/check line 1720.
>   26691 check: Use of uninitialized value $line in length at
> /usr/local/validator/httpd/cgi-bin/check line 1727.

These two seem to be particularly acute for cases of errors in DTD (*cough* SVG 1.1 Basic *cough*) where the parser reports errors at line numbers beyond the number of lines in the actual document. Fixing this with a test on whether the document is actually that long.

Also fixing a couple of similar issues in the detection of doctypeless documents.