We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 485c09a commit c0fae05Copy full SHA for c0fae05
ext/standard/proc_open.c
@@ -512,6 +512,7 @@ PHP_FUNCTION(proc_open)
512
DWORD dwCreateFlags = 0;
513
char *command_with_cmd;
514
UINT old_error_mode;
515
+ char cur_cwd[MAXPATHLEN];
516
#endif
517
#ifdef NETWARE
518
char** child_argv = NULL;
@@ -752,13 +753,13 @@ PHP_FUNCTION(proc_open)
752
753
754
#ifdef PHP_WIN32
755
if (cwd == NULL) {
- char cur_cwd[MAXPATHLEN];
756
char *getcwd_result;
757
getcwd_result = VCWD_GETCWD(cur_cwd, MAXPATHLEN);
758
if (!getcwd_result) {
759
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot get current directory");
760
goto exit_fail;
761
}
762
+ cwd = cur_cwd;
763
764
765
memset(&si, 0, sizeof(si));
0 commit comments