Skip to content

Commit

Permalink
Always return a value from Workflow::Base->param()
Browse files Browse the repository at this point in the history
In 1.58 and 1.59, Workflow was changed to return an empty list instead of
`undef` when the param entry does not exist. This, however, causes two
regressions in LedgerSMB where `param` is called in list context, but
expected to return `undef` (as it used to before 1.58).
  • Loading branch information
ehuelsmann committed Feb 25, 2022
1 parent c9afcd7 commit c61402d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/Workflow/Base.pm
Expand Up @@ -42,10 +42,7 @@ sub param {
}

unless ( defined $value ) {
if ( exists $self->{PARAMS}{$name} ) {
return $self->{PARAMS}{$name};
}
return;
return $self->{PARAMS}{$name};
}
return $self->{PARAMS}{$name} = $value;
}
Expand Down

0 comments on commit c61402d

Please sign in to comment.