summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 69fe2c24f6..577917a007 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -542,7 +542,7 @@ void _php_import_environment_variables(zval *array_ptr)
}
}
-zend_bool php_std_auto_global_callback(char *name, uint name_len)
+zend_bool php_std_auto_global_callback(char *name, uint32_t name_len)
{
zend_printf("%s\n", name);
return 0; /* don't rearm */
@@ -610,7 +610,7 @@ PHPAPI void php_build_argv(char *s, zval *track_vars_array)
zend_hash_str_update(Z_ARRVAL_P(track_vars_array), "argv", sizeof("argv")-1, &arr);
zend_hash_str_update(Z_ARRVAL_P(track_vars_array), "argc", sizeof("argc")-1, &argc);
}
- zval_ptr_dtor(&arr);
+ zval_ptr_dtor_nogc(&arr);
}
/* }}} */
@@ -801,6 +801,11 @@ static zend_bool php_auto_globals_create_server(zend_string *name)
zend_hash_update(&EG(symbol_table), name, &PG(http_globals)[TRACK_VARS_SERVER]);
Z_ADDREF(PG(http_globals)[TRACK_VARS_SERVER]);
+ /* TODO: TRACK_VARS_SERVER is modified in a number of places (e.g. phar) past this point,
+ * where rc>1 due to the $_SERVER global. Ideally this shouldn't happen, but for now we
+ * ignore this issue, as it would probably require larger changes. */
+ HT_ALLOW_COW_VIOLATION(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]));
+
return 0; /* don't rearm */
}