From 70d9c9b774989a2b0ac0750e4e6820f5782e6422 Mon Sep 17 00:00:00 2001 From: "Nathanael d. Noblet" Date: Wed, 5 Aug 2015 22:24:32 -0600 Subject: [PATCH] Fix addStep clobering numerical priorities If you pass in a priority to addStep it will get set to null if the step doesn't implement PriorityStep. --- src/Workflow/StepAggregator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Workflow/StepAggregator.php b/src/Workflow/StepAggregator.php index db319b83..afdddf82 100644 --- a/src/Workflow/StepAggregator.php +++ b/src/Workflow/StepAggregator.php @@ -80,7 +80,7 @@ public function __construct(Reader $reader, $name = null) */ public function addStep(Step $step, $priority = null) { - $priority = null === $priority && $step instanceof PriorityStep ? $step->getPriority() : null; + $priority = null === $priority && $step instanceof PriorityStep ? $step->getPriority() : $priority; $priority = null === $priority ? 0 : $priority; $this->steps->insert($step, $priority);