diff --git a/cake/console/cake.php b/cake/console/cake.php index 891d68b8d..5b033e7ef 100644 --- a/cake/console/cake.php +++ b/cake/console/cake.php @@ -361,7 +361,12 @@ class ShellDispatcher { } else { $this->stdout($prompt . " $print_options \n" . "[$default] > ", false); } - $result = trim(fgets($this->stdin)); + $result = fgets($this->stdin); + + if($result === false){ + exit; + } + $result = trim($result); if ($default != null && empty($result)) { return $default;