File tree Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ PHP NEWS
1818 . Fixed bug GH-19480 (error_log php.ini cannot be unset when open_basedir is
1919 configured). (nielsdos)
2020 . Fixed bug GH-20002 (Broken build on *BSD with MSAN). (outtersg)
21+ . Fixed bug GH-19934 (CGI with auto_globals_jit=0 causes uouv). (ilutov)
2122
2223- CLI:
2324 . Fix useless "Failed to poll event" error logs due to EAGAIN in CLI server
Original file line number Diff line number Diff line change @@ -2023,12 +2023,12 @@ ZEND_API void zend_activate_auto_globals(void) /* {{{ */
20232023 zend_auto_global * auto_global ;
20242024
20252025 ZEND_HASH_MAP_FOREACH_PTR (CG (auto_globals ), auto_global ) {
2026- if (auto_global -> jit ) {
2027- auto_global -> armed = 1 ;
2028- } else if (auto_global -> auto_global_callback ) {
2026+ auto_global -> armed = auto_global -> jit || auto_global -> auto_global_callback ;
2027+ } ZEND_HASH_FOREACH_END ();
2028+
2029+ ZEND_HASH_MAP_FOREACH_PTR (CG (auto_globals ), auto_global ) {
2030+ if (auto_global -> armed && !auto_global -> jit ) {
20292031 auto_global -> armed = auto_global -> auto_global_callback (auto_global -> name );
2030- } else {
2031- auto_global -> armed = 0 ;
20322032 }
20332033 } ZEND_HASH_FOREACH_END ();
20342034}
Original file line number Diff line number Diff line change 1+ --TEST--
2+ CGI with auto_globals_jit=0
3+ --INI--
4+ auto_globals_jit=0
5+ variables_order="EGPCS"
6+ --CGI--
7+ --ENV--
8+ FOO=BAR
9+ --FILE--
10+ <?php
11+ var_dump ($ _SERVER ['FOO ' ]);
12+ var_dump ($ _ENV ['FOO ' ]);
13+ var_dump (getenv ('FOO ' ));
14+ ?>
15+ --EXPECT--
16+ string(3) "BAR"
17+ string(3) "BAR"
18+ string(3) "BAR"
You can’t perform that action at this time.
0 commit comments