File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -716,7 +716,7 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
716
716
#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT))
717
717
/* note: EOF makes readline write prompt again in local console mode - and ignored if compiled without readline */
718
718
#if USE_LIB_STAR
719
- if ((PHPDBG_G (flags ) & PHPDBG_IS_REMOTE ) || !isatty (PHPDBG_G (io )[PHPDBG_STDOUT ].fd ))
719
+ if ((PHPDBG_G (flags ) & PHPDBG_IS_REMOTE ) || !isatty (PHPDBG_G (io )[PHPDBG_STDIN ].fd ))
720
720
#endif
721
721
{
722
722
phpdbg_write ("prompt" , "" , "%s" , phpdbg_get_prompt ());
@@ -726,9 +726,7 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
726
726
else {
727
727
cmd = readline (phpdbg_get_prompt ());
728
728
PHPDBG_G (last_was_newline ) = 1 ;
729
- }
730
729
731
- if (!(PHPDBG_G (flags ) & PHPDBG_IS_REMOTE )) {
732
730
if (!cmd ) {
733
731
PHPDBG_G (flags ) |= PHPDBG_IS_QUITTING | PHPDBG_IS_DISCONNECTED ;
734
732
zend_bailout ();
@@ -744,7 +742,7 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
744
742
buffer = estrdup (cmd );
745
743
746
744
#if USE_LIB_STAR
747
- if (!buffered && cmd && !(PHPDBG_G (flags ) & PHPDBG_IS_REMOTE )) {
745
+ if (!buffered && cmd && !(PHPDBG_G (flags ) & PHPDBG_IS_REMOTE ) && isatty ( PHPDBG_G ( io )[ PHPDBG_STDIN ]. fd ) ) {
748
746
free (cmd );
749
747
}
750
748
#endif
You can’t perform that action at this time.
0 commit comments