Skip to content

Commit 0fa8cda

Browse files
committed
Enforce call to context->param as scalar
This is a follow up to the problem fixed by #195. When a parameter given in the argument list of a validator does not exist this is evaluated as list context and the empty list does not change the runtime_args with the consequence that the position of the arguments changes in the list, breaking the functionality of the validator.
1 parent 8616fb3 commit 0fa8cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Workflow/Action.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ sub validate {
8080
my @runtime_args = ($wf);
8181
foreach my $arg ( @{$args} ) {
8282
if ( $arg =~ /^\$(.*)$/ ) {
83-
push @runtime_args, $context->param($1);
83+
push @runtime_args, scalar $context->param($1);
8484
} else {
8585
push @runtime_args, $arg;
8686
}

0 commit comments

Comments
 (0)