Subject: | Undefined $labelattributes causing uninitialized value errors in httpd log |
Date: | Fri, 9 Dec 2011 11:15:12 -0500 |
To: | <bug-CGI.pm [...] rt.cpan.org> |
From: | "Welter, Jason" <jason.welter [...] tqs.com> |
Adding a checkbox or *_box_group element to a form without passing in
-labelattributes
will cause an uninitialized value in concatenation error in the httpd
error log:
"Use of uninitialized value $_ in concatenation (.) or string at (eval
58) line 23."
I don't know if this is the correct approach but adding this line to
CGI.pm sub checkbox and _box_group
After the rearrange function fixed it:
$labelattributes = defined $labelattributes ? $labelattributes : {};
I'm using CGI version 3.58 but I think the bug exists across all
versions.