]> granicus.if.org Git - php/commitdiff
Fixed add_ref asseration fail
authorXinchen Hui <laruence@gmail.com>
Mon, 17 Mar 2014 04:16:46 +0000 (12:16 +0800)
committerXinchen Hui <laruence@gmail.com>
Mon, 17 Mar 2014 04:16:46 +0000 (12:16 +0800)
ext/reflection/php_reflection.c

index e01cd24821ca0baef4c892baf9b9673aaf16249f..4531e3b1d5fc5d4e5db9a6551fcbfd19a60d6327 100644 (file)
@@ -5019,7 +5019,7 @@ ZEND_METHOD(reflection_property, setValue)
 
                                /* To check: can't *variable_ptr be some system variable like error_zval here? */
                                ZVAL_COPY_VALUE(variable_ptr, value);
-                               if (Z_REFCOUNT_P(value) > 0) {
+                               if (Z_REFCOUNTED_P(value) && Z_REFCOUNT_P(value) > 0) {
                                        zval_copy_ctor(variable_ptr);
                                }
                                zval_dtor(&garbage);