Skip to content
Permalink
Browse files

fix shell help for incorrect user input

  • Loading branch information...
slimus committed Jan 28, 2012
1 parent 752711e commit 57e4751a826b14345b16d802fdb0b60bef61f1b1
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Cake/Console/Shell.php
@@ -453,7 +453,8 @@ public function in($prompt, $options = null, $default = null) {
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 @@ public function in($prompt, $options = null, $default = null) {
$options
);
while ($in === '' || !in_array($in, $options)) {
$in = $this->_getInput($prompt, $options, $default);
$in = $this->_getInput($prompt, $original_options, $default);
}
}
return $in;

0 comments on commit 57e4751

Please sign in to comment.
You can’t perform that action at this time.