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

Merge branch 'PHP-8.3' into PHP-8.4

* PHP-8.3:
  ensure test passes with prod config
  Fix CGI with auto_globals_jit=0
This commit is contained in:
Ilija Tovilo
2025-10-07 18:45:38 +02:00
3 changed files with 24 additions and 5 deletions

1
NEWS
View File

@@ -18,6 +18,7 @@ PHP NEWS
. Fixed bug GH-19480 (error_log php.ini cannot be unset when open_basedir is
configured). (nielsdos)
. Fixed bug GH-20002 (Broken build on *BSD with MSAN). (outtersg)
. Fixed bug GH-19934 (CGI with auto_globals_jit=0 causes uouv). (ilutov)
- CLI:
. Fix useless "Failed to poll event" error logs due to EAGAIN in CLI server

View File

@@ -2023,12 +2023,12 @@ ZEND_API void zend_activate_auto_globals(void) /* {{{ */
zend_auto_global *auto_global;
ZEND_HASH_MAP_FOREACH_PTR(CG(auto_globals), auto_global) {
if (auto_global->jit) {
auto_global->armed = 1;
} else if (auto_global->auto_global_callback) {
auto_global->armed = auto_global->jit || auto_global->auto_global_callback;
} ZEND_HASH_FOREACH_END();
ZEND_HASH_MAP_FOREACH_PTR(CG(auto_globals), auto_global) {
if (auto_global->armed && !auto_global->jit) {
auto_global->armed = auto_global->auto_global_callback(auto_global->name);
} else {
auto_global->armed = 0;
}
} ZEND_HASH_FOREACH_END();
}

View File

@@ -0,0 +1,18 @@
--TEST--
CGI with auto_globals_jit=0
--INI--
auto_globals_jit=0
variables_order="EGPCS"
--CGI--
--ENV--
FOO=BAR
--FILE--
<?php
var_dump($_SERVER['FOO']);
var_dump($_ENV['FOO']);
var_dump(getenv('FOO'));
?>
--EXPECT--
string(3) "BAR"
string(3) "BAR"
string(3) "BAR"