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
18
18
. Fixed bug GH-19480 (error_log php.ini cannot be unset when open_basedir is
19
19
configured). (nielsdos)
20
20
. 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)
21
22
22
23
- CLI:
23
24
. 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) /* {{{ */
2023
2023
zend_auto_global * auto_global ;
2024
2024
2025
2025
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 ) {
2029
2031
auto_global -> armed = auto_global -> auto_global_callback (auto_global -> name );
2030
- } else {
2031
- auto_global -> armed = 0 ;
2032
2032
}
2033
2033
} ZEND_HASH_FOREACH_END ();
2034
2034
}
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