summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_execute_API.c4
-rw-r--r--ext/standard/formatted_print.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 26791c357b..0bb4c6f0a3 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -251,14 +251,14 @@ void shutdown_executor(TSRMLS_D) /* {{{ */
* so that if handler used some class, crash would not happen */
if (Z_TYPE(EG(user_error_handler)) != IS_UNDEF) {
zeh = &EG(user_error_handler);
- ZVAL_UNDEF(&EG(user_error_handler));
zval_ptr_dtor(zeh);
+ ZVAL_UNDEF(&EG(user_error_handler));
}
if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
zeh = &EG(user_exception_handler);
- ZVAL_UNDEF(&EG(user_exception_handler));
zval_ptr_dtor(zeh);
+ ZVAL_UNDEF(&EG(user_exception_handler));
}
zend_stack_destroy(&EG(user_error_handlers_error_reporting));
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index 6317c8214c..b8724dea55 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -395,9 +395,7 @@ php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC)
zval array;
z_format = &args[format_offset];
- ZVAL_COPY_VALUE(&array, &args[1 + format_offset]);
-
- SEPARATE_ZVAL(&array);
+ ZVAL_DUP(&array, &args[1 + format_offset]);
convert_to_array_ex(&array);
argc = 1 + zend_hash_num_elements(Z_ARRVAL(array));
@@ -411,6 +409,7 @@ php_formatted_print(int param_count, int use_array, int format_offset TSRMLS_DC)
i++;
}
efree(args);
+ zval_dtor(&array);
args = newargs;
format_offset = 0;
}