Skip to content

Commit e483761

Browse files
committed
Fix #73926: phpdbg will not accept input on restart execution
We are more liberal, and accept Windows line endings (CRLF) as well.
1 parent 879004d commit e483761

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ PHP NEWS
55
- Core:
66
. Fixed bug #79595 (zend_init_fpu() alters FPU precision). (cmb, Nikita)
77

8+
- phpdbg:
9+
. Fixed bug #73926 (phpdbg will not accept input on restart execution). (cmb)
10+
811
11 Jun 2020, PHP 7.4.7
912

1013
- Core:

sapi/phpdbg/phpdbg_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ PHPDBG_API int phpdbg_ask_user_permission(const char *question) {
823823

824824
while (1) {
825825
phpdbg_consume_stdin_line(buf);
826-
if (buf[1] == '\n' && (buf[0] == 'y' || buf[0] == 'n')) {
826+
if ((buf[1] == '\n' || (buf[1] == '\r' && buf[2] == '\n')) && (buf[0] == 'y' || buf[0] == 'n')) {
827827
if (buf[0] == 'y') {
828828
return SUCCESS;
829829
}

0 commit comments

Comments
 (0)