From 6c471e9ac15eb6342e5631d94647613d02455db8 Mon Sep 17 00:00:00 2001 From: Paul van Schayck Date: Tue, 29 Mar 2016 23:59:56 +0200 Subject: [PATCH] array_search() returns false upon an invalid step Respond correctly to invalid steps --- WizardBehavior.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ||