SVN: toys/rsget.pl/RSGet/Form.pm
sparky
sparky at pld-linux.org
Thu Oct 22 16:58:58 CEST 2009
Author: sparky
Date: Thu Oct 22 16:58:57 2009
New Revision: 10818
Modified:
toys/rsget.pl/RSGet/Form.pm
Log:
- allow value 0
Modified: toys/rsget.pl/RSGet/Form.pm
==============================================================================
--- toys/rsget.pl/RSGet/Form.pm (original)
+++ toys/rsget.pl/RSGet/Form.pm Thu Oct 22 16:58:57 2009
@@ -93,7 +93,8 @@
$values{ $name } = undef;
}
if ( $el eq "input" and lc $attr->{type} eq "hidden" ) {
- $values{ $name } = $attr->{value} || "";
+ my $v = $attr->{value};
+ $values{ $name } = defined $v ? $v : "";
}
}
$self->{order} = \@order;
@@ -119,7 +120,7 @@
s/(\S+)//;
$value = $1;
}
- $attr{ $name } = de_ml( $value || "" );
+ $attr{ $name } = defined $value ? de_ml( $value ) : "";
} else {
$attr{ $name } = $name;
}
More information about the pld-cvs-commit
mailing list