From 57e4751a826b14345b16d802fdb0b60bef61f1b1 Mon Sep 17 00:00:00 2001 From: slimus Date: Sat, 28 Jan 2012 16:36:59 +0700 Subject: [PATCH] fix shell help for incorrect user input --- lib/Cake/Console/Shell.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Console/Shell.php b/lib/Cake/Console/Shell.php index 8671b0150..11584500b 100644 --- a/lib/Cake/Console/Shell.php +++ b/lib/Cake/Console/Shell.php @@ -453,7 +453,8 @@ class Shell extends Object { if (!$this->interactive) { return $default; } - $in = $this->_getInput($prompt, $options, $default); + $original_options = $options; + $in = $this->_getInput($prompt, $original_options, $default); if ($options && is_string($options)) { if (strpos($options, ',')) { @@ -471,7 +472,7 @@ class Shell extends Object { $options ); while ($in === '' || !in_array($in, $options)) { - $in = $this->_getInput($prompt, $options, $default); + $in = $this->_getInput($prompt, $original_options, $default); } } return $in;