cvs: ZendEngine2 / zend_object_handlers.c
| From: | Dmitry Stogov | Date: | Tue, 03 May 2005 12:47:28 +0000 |
| Subject: | cvs: ZendEngine2 / zend_object_handlers.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3649@lists.php.net to get a copy of this message | ||
dmitry Tue May 3 08:47:28 2005 EDT
Modified files:
/ZendEngine2 zend_object_handlers.c
Log:
Fixed destruction of zval after returning from __call()
http://cvs.php.net/diff.php/ZendEngine2/zend_object_handlers.c?r1=1.122&r2=1.123&ty=u
Index: ZendEngine2/zend_object_handlers.c
diff -u ZendEngine2/zend_object_handlers.c:1.122 ZendEngine2/zend_object_handlers.c:1.123
--- ZendEngine2/zend_object_handlers.c:1.122 Mon May 2 12:18:01 2005
+++ ZendEngine2/zend_object_handlers.c Tue May 3 08:47:27 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_object_handlers.c,v 1.122 2005/05/02 16:18:01 helly Exp $ */
+/* $Id: zend_object_handlers.c,v 1.123 2005/05/03 12:47:27 dmitry Exp $ */
#include "zend.h"
#include "zend_globals.h"
@@ -527,7 +527,11 @@
zend_call_method_with_2_params(&this_ptr, ce, &ce->__call, ZEND_CALL_FUNC_NAME,
&method_result_ptr, method_name_ptr, method_args_ptr);
if (method_result_ptr) {
- RETVAL_ZVAL(method_result_ptr, 0, 1);
+ if (method_result_ptr->is_ref || method_result_ptr->refcount > 1) {
+ RETVAL_ZVAL(method_result_ptr, 1, 1);
+ } else {
+ RETVAL_ZVAL(method_result_ptr, 0, 1);
+ }
}
/* now destruct all auxiliaries */