Skip to content

Commit

Permalink
Fix LazyAND condition failing when nested condition returns a string
Browse files Browse the repository at this point in the history
As shown by the CheckReturn condition, conditions can return any value
that is interpreted as true or false, not just zero or one (or even a
number).

Since the result is used to check that more than a single condition was
evaluated, there's no need to use the condition result.
  • Loading branch information
ehuelsmann committed Jan 10, 2021
1 parent 306fa1c commit 0b5186b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Workflow/Condition/LazyAND.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sub evaluate {
if ( not $result ) {
condition_error("Condition '$cond' returned 'false'");
}
$total += $result;
$total++;
}

return $total
Expand Down

0 comments on commit 0b5186b

Please sign in to comment.