summaryrefslogtreecommitdiff
path: root/Zend/zend_object_handlers.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2016-05-05 23:31:57 +0200
committerBob Weinand <bobwei9@hotmail.com>2016-05-05 23:31:57 +0200
commitbac6fdb0c52c924e726c5a78de8858bf27b6586b (patch)
tree627f2ec8d91955e99456783aebd94ac5d4236f32 /Zend/zend_object_handlers.c
parent59f35c0ca9abfa72c5393f6c0350759a3f6512d8 (diff)
downloadphp-git-bac6fdb0c52c924e726c5a78de8858bf27b6586b.tar.gz
Refactor zval cleanup into single function
Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
Diffstat (limited to 'Zend/zend_object_handlers.c')
-rw-r--r--Zend/zend_object_handlers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 22e81dc009..382ee29fb2 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -1680,7 +1680,7 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
ce = Z_OBJCE_P(readobj);
zend_error(E_NOTICE, "Object of class %s could not be converted to int", ZSTR_VAL(ce->name));
if (readobj == writeobj) {
- zval_dtor(readobj);
+ zval_ptr_dtor_nogc(readobj);
}
ZVAL_LONG(writeobj, 1);
return SUCCESS;
@@ -1688,7 +1688,7 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
ce = Z_OBJCE_P(readobj);
zend_error(E_NOTICE, "Object of class %s could not be converted to float", ZSTR_VAL(ce->name));
if (readobj == writeobj) {
- zval_dtor(readobj);
+ zval_ptr_dtor_nogc(readobj);
}
ZVAL_DOUBLE(writeobj, 1);
return SUCCESS;