summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-12-27 20:16:49 +0000
committerMarcus Boerger <helly@php.net>2003-12-27 20:16:49 +0000
commitdb36fd0200972594a37c98c2d742bda8c9c4da84 (patch)
tree692c612757d7e26ffa375a90b5fee43367c404d4
parentc7e945888b997484cd44bd6ea8c2e950f1f96708 (diff)
downloadphp-git-db36fd0200972594a37c98c2d742bda8c9c4da84.tar.gz
Fix __tostring() and concatenation
-rw-r--r--Zend/zend_object_handlers.c7
1 files changed, 1 insertions, 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;
}