mirror of
https://github.com/php/php-src.git
synced 2024-11-25 10:54:15 +08:00
broken logic fixed. I'm getting old
This commit is contained in:
parent
20a6474eae
commit
4647bbb71a
16
main/main.c
16
main/main.c
@ -1029,13 +1029,15 @@ static int php_hash_environment(ELS_D SLS_DC PLS_DC)
|
||||
}
|
||||
|
||||
for (i=0; i<6; i++) {
|
||||
if (!PG(http_globals)[i] && !initialized_dummy_track_vars_array) {
|
||||
ALLOC_ZVAL(dummy_track_vars_array);
|
||||
array_init(dummy_track_vars_array);
|
||||
INIT_PZVAL(dummy_track_vars_array);
|
||||
initialized_dummy_track_vars_array = 1;
|
||||
} else {
|
||||
dummy_track_vars_array->refcount++;
|
||||
if (!PG(http_globals)[i]) {
|
||||
if (!initialized_dummy_track_vars_array) {
|
||||
ALLOC_ZVAL(dummy_track_vars_array);
|
||||
array_init(dummy_track_vars_array);
|
||||
INIT_PZVAL(dummy_track_vars_array);
|
||||
initialized_dummy_track_vars_array = 1;
|
||||
} else {
|
||||
dummy_track_vars_array->refcount++;
|
||||
}
|
||||
PG(http_globals)[i] = dummy_track_vars_array;
|
||||
}
|
||||
zend_hash_update(&EG(symbol_table), track_vars_names[i], track_vars_names_length[i], &PG(http_globals)[i], sizeof(zval *), NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user