[Rt-commit] rt branch, 4.0/non-numerical-checkbox-id-warnings, created. rt-4.0.13-84-ga0b4845
Kevin Falcone
falcone at bestpractical.com
Tue Jun 25 16:15:25 EDT 2013
The branch, 4.0/non-numerical-checkbox-id-warnings has been created
at a0b4845c9db82680dfd3af9591e4070683e917cc (commit)
- Log -----------------------------------------------------------------
commit a0b4845c9db82680dfd3af9591e4070683e917cc
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Tue Jun 25 16:02:02 2013 -0400
Make sure we don't numerically compare ""
RTIR submits an input=text with the same name as the Checkbox.
Fixing RTIR to stop doing that turns out to be more interesting than
just squashing the warning.
diff --git a/share/html/Elements/ColumnMap b/share/html/Elements/ColumnMap
index 330aced..0022ba2 100644
--- a/share/html/Elements/ColumnMap
+++ b/share/html/Elements/ColumnMap
@@ -145,7 +145,7 @@ my $COLUMN_MAP = {
my $arg = $DECODED_ARGS->{ $name };
my $checked = '';
if ( $arg && ref $arg ) {
- $checked = 'checked="checked"' if grep $_ == $id, @$arg;
+ $checked = 'checked="checked"' if grep $_ == $id, grep { defined and length } @$arg;
}
elsif ( $arg ) {
$checked = 'checked="checked"' if $arg == $id;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list