diff options
Diffstat (limited to 'Zend/zend_object_handlers.c')
| -rw-r--r-- | Zend/zend_object_handlers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 6acb504e5f..9029f45cc4 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1527,9 +1527,9 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty if (EXPECTED(Z_TYPE(retval) == IS_STRING)) { //??? INIT_PZVAL(writeobj); if (readobj == writeobj) { - zval_dtor(readobj); + zval_ptr_dtor(readobj); } - ZVAL_ZVAL(writeobj, &retval, 1, 1); + ZVAL_COPY_VALUE(writeobj, &retval); if (Z_TYPE_P(writeobj) != type) { convert_to_explicit_type(writeobj, type); } @@ -1538,7 +1538,7 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty zval_ptr_dtor(&retval); //??? INIT_PZVAL(writeobj); if (readobj == writeobj) { - zval_dtor(readobj); + zval_ptr_dtor(readobj); } ZVAL_EMPTY_STRING(writeobj); zend_error(E_RECOVERABLE_ERROR, "Method %s::__toString() must return a string value", ce->name->val); |
