]> granicus.if.org Git - php/commitdiff
Fixed bug #24279 (__get() crash when no value is returned)
authorIlia Alshanetsky <iliaa@php.net>
Sun, 29 Jun 2003 23:41:49 +0000 (23:41 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 29 Jun 2003 23:41:49 +0000 (23:41 +0000)
Zend/zend_object_handlers.c

index 213ece098c99699315a2b471d2a588390f26f0d5..0181a0cc4b2f7a5c8385b2ba1c83db57651cff42 100644 (file)
@@ -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;
 }