Browse files

Fixes Command::in not looping. See http://dev.lithify.me/lithium/tick…

  • Loading branch information...
1 parent 800d67c commit f32a0a438548bd246f0640f5dcbd6865482d5a06 @masom masom committed Jun 6, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 libraries/lithium/console/Command.php
View
6 libraries/lithium/console/Command.php
@@ -200,8 +200,8 @@ public function in($prompt = null, $options = array()) {
do {
$result = trim($this->request->input());
} while (
- $result == null && !empty($options['quit']) && $result != $options['quit']
- && !empty($options['options']) && array_search($result, $options['options'])
+ !empty($options['quit']) && $result != $options['quit']
+ && !empty($options['choices']) && !in_array($result, $options['choices'], true)
);
if ($options['default'] != null && empty($result)) {
@@ -357,4 +357,4 @@ protected function _response($type, $string, $options) {
}
}
-?>
+?>

0 comments on commit f32a0a4

Please sign in to comment.