summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-11-16 23:22:19 +0100
committerAnatol Belski <ab@php.net>2018-11-16 23:22:19 +0100
commit00c08a2e4a8f4294744c5ba77792e5aa6e91e920 (patch)
tree3351cf5ddc578b74053b8ade2c666f5703993915 /sapi/cli/php_cli.c
parentdee5a450d9b7f7b03f012dd1912cc0a3dcb0482c (diff)
parenta7e9790969952c0574d8708277abfd25d12f58e5 (diff)
downloadphp-git-00c08a2e4a8f4294744c5ba77792e5aa6e91e920.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fixed bug #77111 php-win.exe corrupts unicode symbols from cli parameters
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r--sapi/cli/php_cli.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index a36ea1893a..3b053e223a 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -637,7 +637,7 @@ static int cli_seek_file_begin(zend_file_handle *file_handle, char *script_file,
/* }}} */
/*{{{ php_cli_win32_ctrl_handler */
-#if defined(PHP_WIN32) && !defined(PHP_CLI_WIN32_NO_CONSOLE)
+#if defined(PHP_WIN32)
BOOL WINAPI php_cli_win32_ctrl_handler(DWORD sig)
{
(void)php_win32_cp_cli_do_restore(orig_cp);
@@ -1190,12 +1190,11 @@ int main(int argc, char *argv[])
# ifdef PHP_CLI_WIN32_NO_CONSOLE
int argc = __argc;
char **argv = __argv;
-# else
+# endif
int num_args;
wchar_t **argv_wide;
char **argv_save = argv;
BOOL using_wide_argv = 0;
-# endif
#endif
int c;
@@ -1365,7 +1364,7 @@ exit_loop:
}
module_started = 1;
-#if defined(PHP_WIN32) && !defined(PHP_CLI_WIN32_NO_CONSOLE)
+#if defined(PHP_WIN32)
php_win32_cp_cli_setup();
orig_cp = (php_win32_cp_get_orig())->id;
/* Ignore the delivered argv and argc, read from W API. This place
@@ -1411,7 +1410,7 @@ out:
tsrm_shutdown();
#endif
-#if defined(PHP_WIN32) && !defined(PHP_CLI_WIN32_NO_CONSOLE)
+#if defined(PHP_WIN32)
(void)php_win32_cp_cli_restore();
if (using_wide_argv) {