From: Ilia Alshanetsky Date: Sun, 29 Jun 2003 23:41:49 +0000 (+0000) Subject: Fixed bug #24279 (__get() crash when no value is returned) X-Git-Tag: BEFORE_ARG_INFO~547 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9754535255ba8b3d1042f6517a912a900e464877;p=php Fixed bug #24279 (__get() crash when no value is returned) --- diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 213ece098c..0181a0cc4b 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -91,9 +91,10 @@ static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC) zend_error(E_ERROR, "Could not call __get handler for class %s", Z_OBJCE_P(object)->name); return NULL; } + if (retval) { + retval->refcount--; + } - retval->refcount--; - return retval; }