mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
fix shell help for incorrect user input
This commit is contained in:
parent
752711e963
commit
57e4751a82
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue