Skip to content

Commit e5c273d

Browse files
committed
Turn interactive mode on, if cli binary is clicked in filemanager
1 parent d32288b commit e5c273d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sapi/cli/php_cli.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,12 @@ static int do_cli(int argc, char **argv) /* {{{ */
674674
char *exec_direct=NULL, *exec_run=NULL, *exec_begin=NULL, *exec_end=NULL;
675675
char *arg_free=NULL, **arg_excp=&arg_free;
676676
char *script_file=NULL, *translated_path = NULL;
677+
#if defined(PHP_WIN32) && !defined(PHP_CLI_WIN32_NO_CONSOLE) && (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
678+
DWORD pl[1];
679+
int interactive = GetConsoleProcessList(pl, 1) == 1;
680+
#else
677681
int interactive=0;
682+
#endif
678683
int lineno = 0;
679684
const char *param_error=NULL;
680685
int hide_argv = 0;

0 commit comments

Comments
 (0)