From c61402d76cf8f71e3c0fe9806a008e70167de5f5 Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Fri, 25 Feb 2022 20:51:09 +0100 Subject: [PATCH] Always return a value from Workflow::Base->param() 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). --- lib/Workflow/Base.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Workflow/Base.pm b/lib/Workflow/Base.pm index fc17857..14c211e 100644 --- a/lib/Workflow/Base.pm +++ b/lib/Workflow/Base.pm @@ -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; }