From: Marcus Boerger Date: Thu, 2 Mar 2006 00:45:28 +0000 (+0000) Subject: - MFH Use object handler get in the same way as the rest of the engine does X-Git-Tag: php-5.1.3RC1~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7addae5089c8dc8956367efd34075e8554f3b016;p=php - MFH Use object handler get in the same way as the rest of the engine does --- 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)) {