From db36fd0200972594a37c98c2d742bda8c9c4da84 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sat, 27 Dec 2003 20:16:49 +0000 Subject: [PATCH] Fix __tostring() and concatenation --- Zend/zend_object_handlers.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index fdf3d2bc5e..f3884dbd9d 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -918,7 +918,6 @@ int zend_std_object_get_class_name(zval *object, char **class_name, zend_uint *c ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC) { zval fname, *retval; - int is_ref, refcount; switch (type) { case IS_STRING: @@ -932,13 +931,9 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty MAKE_STD_ZVAL(retval); ZVAL_STRINGL(retval, empty_string, 0, 0); } - zval_dtor(writeobj); - is_ref = writeobj->is_ref; - refcount = writeobj->refcount; *writeobj = *retval; zval_copy_ctor(writeobj); - writeobj->is_ref = is_ref; - writeobj->refcount = refcount; + INIT_PZVAL(writeobj); zval_ptr_dtor(&retval); return SUCCESS; } -- 2.40.0