diff options
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_cmd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index 36f1a3f4ab..9a3751a424 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -729,11 +729,15 @@ readline: PHPDBG_G(last_was_newline) = 1; } - if (!cmd) { - goto readline; - } - if (!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) { + if (!cmd) { + if (feof(PHPDBG_G(io)[PHPDBG_STDIN].ptr)) { + PHPDBG_G(flags) |= PHPDBG_IS_QUITTING | PHPDBG_IS_DISCONNECTED; + zend_bailout(); + } + goto readline; + } + add_history(cmd); } #endif |