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:
1
NEWS
1
NEWS
@@ -18,6 +18,7 @@ PHP NEWS
|
|||||||
. Fixed bug GH-19480 (error_log php.ini cannot be unset when open_basedir is
|
. Fixed bug GH-19480 (error_log php.ini cannot be unset when open_basedir is
|
||||||
configured). (nielsdos)
|
configured). (nielsdos)
|
||||||
. Fixed bug GH-20002 (Broken build on *BSD with MSAN). (outtersg)
|
. 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:
|
- CLI:
|
||||||
. Fix useless "Failed to poll event" error logs due to EAGAIN in CLI server
|
. Fix useless "Failed to poll event" error logs due to EAGAIN in CLI server
|
||||||
|
|||||||
@@ -2023,12 +2023,12 @@ ZEND_API void zend_activate_auto_globals(void) /* {{{ */
|
|||||||
zend_auto_global *auto_global;
|
zend_auto_global *auto_global;
|
||||||
|
|
||||||
ZEND_HASH_MAP_FOREACH_PTR(CG(auto_globals), auto_global) {
|
ZEND_HASH_MAP_FOREACH_PTR(CG(auto_globals), auto_global) {
|
||||||
if (auto_global->jit) {
|
auto_global->armed = auto_global->jit || auto_global->auto_global_callback;
|
||||||
auto_global->armed = 1;
|
} ZEND_HASH_FOREACH_END();
|
||||||
} else if (auto_global->auto_global_callback) {
|
|
||||||
|
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);
|
auto_global->armed = auto_global->auto_global_callback(auto_global->name);
|
||||||
} else {
|
|
||||||
auto_global->armed = 0;
|
|
||||||
}
|
}
|
||||||
} ZEND_HASH_FOREACH_END();
|
} ZEND_HASH_FOREACH_END();
|
||||||
}
|
}
|
||||||
|
|||||||
18
sapi/cgi/tests/auto_globals_no_jit.phpt
Normal file
18
sapi/cgi/tests/auto_globals_no_jit.phpt
Normal 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"
|
||||||
Reference in New Issue
Block a user