Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow PseudoRequest to handle 0 and '' correctly. Kudos to knowmad fo…
…r pointing this behavior out.
  • Loading branch information
perlDreamer committed Sep 29, 2011
1 parent f33c19d commit c17d9aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions t/Asset/EMSSubmissionForm.t
Expand Up @@ -432,10 +432,10 @@ my $expected = {
},
'description' => undef,
'_isValid' => 1,
'deleteCreatedItems' => undef,
'deleteCreatedItems' => 0,
'canSubmitGroupId' => '2',
'assetId' => 'new',
'url' => undef,
'url' => '',
'daysBeforeCleanup' => '7',
'title' => 'Untitled',
} ;
Expand Down
2 changes: 1 addition & 1 deletion t/lib/WebGUI/PseudoRequest.pm
Expand Up @@ -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}};
}
Expand Down

0 comments on commit c17d9aa

Please sign in to comment.