Commit 7b216e61 authored by Clément OUDOT's avatar Clément OUDOT

Allow 0 value in setHiddenFormValue (#1328)

parent 33c6caa5
......@@ -582,7 +582,7 @@ sub setHiddenFormValue {
$val = '' unless defined $val;
# Store value
if ( $val or !( $val & ~$val ) ) {
if ( defined $val or !( $val & ~$val ) ) {
$key = $prefix . $key;
$val =~ s/\+/%2B/g;
$req->{portalHiddenFormValues}->{$key} = $val;
......@@ -606,10 +606,11 @@ sub getHiddenFormValue {
$key = $prefix . $key;
# Get value
if ( my $val = $req->param($key) ) {
my $val = $req->param($key);
if ( defined $val ) {
$val = decode_base64($val) if $base64;
return $val;
$self->logger->debug("Hidden value $val found for key $key");
return $val;
}
# No value found
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment