Commit 9bc35f1
committed
Fix CGI with auto_globals_jit=0
In CGI, php_auto_globals_create_server() (i.e. auto_global_callback() here)
initializes $_ENV to reuse for $_SERVER. However, because $_SERVER is
constructed first, we have not yet initialized auto_global->armed of the $_ENV
global. Split the loop into initialization and constructor phases.
Fixes GH-19934
Closes GH-198701 parent 59bfaa6 commit 9bc35f1
File tree
3 files changed
+23
-5
lines changed- Zend
- sapi/cgi/tests
3 files changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1938 | 1938 | | |
1939 | 1939 | | |
1940 | 1940 | | |
1941 | | - | |
1942 | | - | |
1943 | | - | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
1944 | 1946 | | |
1945 | | - | |
1946 | | - | |
1947 | 1947 | | |
1948 | 1948 | | |
1949 | 1949 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments