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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index ca8d8b7334..5ac61a4fa0 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -224,6 +224,8 @@ PHPAPI void php_register_variable_ex(char *var_name, zval *val, zval *track_vars
if (Z_TYPE_P(gpc_element_p) != IS_ARRAY) {
zval_ptr_dtor_nogc(gpc_element_p);
array_init(gpc_element_p);
+ } else {
+ SEPARATE_ARRAY(gpc_element_p);
}
}
}