From 7addae5089c8dc8956367efd34075e8554f3b016 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 2 Mar 2006 00:45:28 +0000 Subject: [PATCH] - MFH Use object handler get in the same way as the rest of the engine does --- Zend/zend.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Zend/zend.c b/Zend/zend.c index 8c91586510..fe009ffd7c 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -237,16 +237,19 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop } else { if(Z_OBJ_HANDLER_P(expr, get)) { zval *z = Z_OBJ_HANDLER_P(expr, get)(expr TSRMLS_CC); + + z->refcount++; if(Z_TYPE_P(z) != IS_OBJECT) { zend_make_printable_zval(z, expr_copy, use_copy); if (*use_copy) { - FREE_ZVAL(z); + zval_ptr_dtor(&z); } else { ZVAL_ZVAL(expr_copy, z, 0, 1); *use_copy = 1; } return; } + zval_ptr_dtor(&z); } } if (EG(exception)) { -- 2.50.1