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) /* {{{ */
716716#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT))
717717 /* note: EOF makes readline write prompt again in local console mode - and ignored if compiled without readline */
718718#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 ))
720720#endif
721721 {
722722 phpdbg_write ("prompt" , "" , "%s" , phpdbg_get_prompt ());
@@ -726,9 +726,7 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
726726 else {
727727 cmd = readline (phpdbg_get_prompt ());
728728 PHPDBG_G (last_was_newline ) = 1 ;
729- }
730729
731- if (!(PHPDBG_G (flags ) & PHPDBG_IS_REMOTE )) {
732730 if (!cmd ) {
733731 PHPDBG_G (flags ) |= PHPDBG_IS_QUITTING | PHPDBG_IS_DISCONNECTED ;
734732 zend_bailout ();
@@ -744,7 +742,7 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
744742 buffer = estrdup (cmd );
745743
746744#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 ) ) {
748746 free (cmd );
749747 }
750748#endif
You can’t perform that action at this time.
0 commit comments