]> granicus.if.org Git - php/commitdiff
Fix #73926: phpdbg will not accept input on restart execution
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 19 May 2020 12:45:47 +0000 (14:45 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Tue, 26 May 2020 15:44:39 +0000 (17:44 +0200)
We are more liberal, and accept Windows line endings (CRLF) as well.

NEWS
sapi/phpdbg/phpdbg_cmd.c

diff --git a/NEWS b/NEWS
index dfe4a5dc98b02927f6160f06f27a4ac881cd74c4..c7b5542554143689a1dbb348b5c0efba2c776daa 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ PHP                                                                        NEWS
 - Core:
   . Fixed bug #79595 (zend_init_fpu() alters FPU precision). (cmb, Nikita)
 
+- phpdbg:
+  . Fixed bug #73926 (phpdbg will not accept input on restart execution). (cmb)
+
 11 Jun 2020, PHP 7.4.7
 
 - Core:
index b736481089b6537e76d10fc3293c8e19b38c9ad0..4845acca9a5c3f1e68fcaf55ecaabc48a9b39317 100644 (file)
@@ -823,7 +823,7 @@ PHPDBG_API int phpdbg_ask_user_permission(const char *question) {
 
                while (1) {
                        phpdbg_consume_stdin_line(buf);
-                       if (buf[1] == '\n' && (buf[0] == 'y' || buf[0] == 'n')) {
+                       if ((buf[1] == '\n' || (buf[1] == '\r' && buf[2] == '\n')) && (buf[0] == 'y' || buf[0] == 'n')) {
                                if (buf[0] == 'y') {
                                        return SUCCESS;
                                }