1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

main: Disable $_SERVER JIT when register_argc_argv=1 (#19833)

Fixes php/php-src#19823 and makes the deprecation more reliable by triggering
even when `$_SERVER` is not accessed.
This commit is contained in:
Tim Düsterhus
2025-09-17 19:48:18 +02:00
committed by GitHub
parent fe0263f344
commit c89359164b
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@@ -9,6 +9,8 @@ PHP NEWS
. Fixed hard_timeout with --enable-zend-max-execution-timers. (Appla)
. Fixed bug GH-19839 (Incorrect HASH_FLAG_HAS_EMPTY_IND flag on userland
array). (ilutov)
. Fixed bug GH-19823 (register_argc_argv deprecation emitted twice when
using OPcache). (timwolla)
- Curl:
. Fix cloning of CURLOPT_POSTFIELDS when using the clone operator instead

View File

@@ -975,7 +975,7 @@ void php_startup_auto_globals(void)
zend_register_auto_global(zend_string_init_interned("_GET", sizeof("_GET")-1, 1), 0, php_auto_globals_create_get);
zend_register_auto_global(zend_string_init_interned("_POST", sizeof("_POST")-1, 1), 0, php_auto_globals_create_post);
zend_register_auto_global(zend_string_init_interned("_COOKIE", sizeof("_COOKIE")-1, 1), 0, php_auto_globals_create_cookie);
zend_register_auto_global(ZSTR_KNOWN(ZEND_STR_AUTOGLOBAL_SERVER), PG(auto_globals_jit), php_auto_globals_create_server);
zend_register_auto_global(ZSTR_KNOWN(ZEND_STR_AUTOGLOBAL_SERVER), PG(auto_globals_jit) && (SG(request_info).argc || !PG(register_argc_argv)), php_auto_globals_create_server);
zend_register_auto_global(ZSTR_KNOWN(ZEND_STR_AUTOGLOBAL_ENV), PG(auto_globals_jit), php_auto_globals_create_env);
zend_register_auto_global(ZSTR_KNOWN(ZEND_STR_AUTOGLOBAL_REQUEST), PG(auto_globals_jit), php_auto_globals_create_request);
zend_register_auto_global(zend_string_init_interned("_FILES", sizeof("_FILES")-1, 1), 0, php_auto_globals_create_files);