diff --git a/WizardBehavior.php b/WizardBehavior.php index e5f05ff..143df83 100644 --- a/WizardBehavior.php +++ b/WizardBehavior.php @@ -594,7 +594,7 @@ protected function isValidStep($step) $index = array_search($step, $steps); $expectedStep = $this->expectedStep(); // NULL if wizard finished - if ($index == 0 || ($index >= 0 && ($this->forwardOnly + if ($index === 0 || ($index >= 0 && ($this->forwardOnly ? $expectedStep !== null && $index === array_search($expectedStep, $steps) : $expectedStep === null ||