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
|
|
@ -432,10 +432,10 @@ my $expected = {
|
||||||
},
|
},
|
||||||
'description' => undef,
|
'description' => undef,
|
||||||
'_isValid' => 1,
|
'_isValid' => 1,
|
||||||
'deleteCreatedItems' => undef,
|
'deleteCreatedItems' => 0,
|
||||||
'canSubmitGroupId' => '2',
|
'canSubmitGroupId' => '2',
|
||||||
'assetId' => 'new',
|
'assetId' => 'new',
|
||||||
'url' => undef,
|
'url' => '',
|
||||||
'daysBeforeCleanup' => '7',
|
'daysBeforeCleanup' => '7',
|
||||||
'title' => 'Untitled',
|
'title' => 'Untitled',
|
||||||
} ;
|
} ;
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ sub body {
|
||||||
return keys %{ $self->{body} } if wantarray;
|
return keys %{ $self->{body} } if wantarray;
|
||||||
return { %{ $self->{body} } };
|
return { %{ $self->{body} } };
|
||||||
}
|
}
|
||||||
if ($self->{body}->{$value}) {
|
if (defined $self->{body}->{$value}) {
|
||||||
if (wantarray && ref $self->{body}->{$value} eq "ARRAY") {
|
if (wantarray && ref $self->{body}->{$value} eq "ARRAY") {
|
||||||
return @{$self->{body}->{$value}};
|
return @{$self->{body}->{$value}};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue