Skip to content

Commit 026d470

Browse files
committed
sapi: Remove hardcoded register_argc_argv for CLI SAPIs
This INI is ignored since the previous commit, which makes the hardcoded setting obsolete.
1 parent 6ea0eb9 commit 026d470

File tree

5 files changed

+2
-5
lines changed

5 files changed

+2
-5
lines changed

php.ini-development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ request_order = "GP"
662662
; enabled, registering these variables consumes CPU cycles and memory each time
663663
; a script is executed. For security reasons, this feature should be disabled
664664
; for non-CLI SAPIs.
665-
; Note: This directive is hardcoded to On for the CLI SAPI
665+
; Note: This directive is ignored for the CLI SAPI
666666
; This directive is deprecated.
667667
; https://php.net/register-argc-argv
668668
;register_argc_argv = Off

php.ini-production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ request_order = "GP"
664664
; enabled, registering these variables consumes CPU cycles and memory each time
665665
; a script is executed. For security reasons, this feature should be disabled
666666
; for non-CLI SAPIs.
667-
; Note: This directive is hardcoded to On for the CLI SAPI
667+
; Note: This directive is ignored for the CLI SAPI
668668
; This directive is deprecated.
669669
; https://php.net/register-argc-argv
670670
;register_argc_argv = Off

sapi/cli/php_cli.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks(void)
115115

116116
static const char HARDCODED_INI[] =
117117
"html_errors=0\n"
118-
"register_argc_argv=1\n"
119118
"implicit_flush=1\n"
120119
"output_buffering=0\n"
121120
"max_execution_time=0\n"

sapi/embed/php_embed.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
static const char HARDCODED_INI[] =
2727
"html_errors=0\n"
28-
"register_argc_argv=1\n"
2928
"implicit_flush=1\n"
3029
"output_buffering=0\n"
3130
"max_execution_time=0\n"

sapi/phpdbg/phpdbg.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,6 @@ static const opt_struct OPTIONS[] = { /* {{{ */
982982

983983
const char phpdbg_ini_hardcoded[] =
984984
"html_errors=Off\n"
985-
"register_argc_argv=On\n"
986985
"implicit_flush=On\n"
987986
"display_errors=Off\n"
988987
"log_errors=On\n"

0 commit comments

Comments
 (0)