Allow PseudoRequest to handle 0 and '' correctly. Kudos to knowmad for pointing this behavior out.
This commit is contained in:
parent
f33c19d503
commit
c17d9aa394
2 changed files with 3 additions and 3 deletions
|
|
@ -87,7 +87,7 @@ sub body {
|
|||
return keys %{ $self->{body} } if wantarray;
|
||||
return { %{ $self->{body} } };
|
||||
}
|
||||
if ($self->{body}->{$value}) {
|
||||
if (defined $self->{body}->{$value}) {
|
||||
if (wantarray && ref $self->{body}->{$value} eq "ARRAY") {
|
||||
return @{$self->{body}->{$value}};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue