mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fixes #3220, Hitting Ctrl-D in a cake console, causes it to loop forever.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5623 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
a41b962ae5
commit
1ed5a285ba
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue