summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r--ext/standard/basic_functions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 6119e74fb8..cf10e21cea 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -5418,7 +5418,7 @@ PHP_FUNCTION(register_shutdown_function)
}
for (i = 0; i < shutdown_function_entry.arg_count; i++) {
- shutdown_function_entry.arguments[i]->refcount++;
+ Z_ADDREF_P(shutdown_function_entry.arguments[i]);
}
zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL);
}
@@ -5994,7 +5994,7 @@ PHP_FUNCTION(register_tick_function)
}
for (i = 0; i < tick_fe.arg_count; i++) {
- tick_fe.arguments[i]->refcount++;
+ Z_ADDREF_P(tick_fe.arguments[i]);
}
zend_llist_add_element(BG(user_tick_functions), &tick_fe);
@@ -6285,7 +6285,7 @@ static int copy_request_variable(void *pDest, int num_args, va_list args, zend_h
}
zend_delete_global_variable(Z_STRVAL(new_key), Z_STRLEN(new_key) TSRMLS_CC);
- ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), Z_STRVAL(new_key), Z_STRLEN(new_key) + 1, *var, (*var)->refcount + 1, 0);
+ ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), Z_STRVAL(new_key), Z_STRLEN(new_key) + 1, *var, Z_REFCOUNT_PP(var) + 1, 0);
zval_dtor(&new_key);
return 0;