diff options
| author | Xinchen Hui <laruence@gmail.com> | 2014-03-02 15:15:51 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@gmail.com> | 2014-03-02 15:15:51 +0800 |
| commit | 8d2c1f58a16c4343204cc828bae6291c1064d565 (patch) | |
| tree | 3bd48809a06c25ee5d5b54c3adf2025a26653246 | |
| parent | ff5870a28805812bce4a4bfcd877d8e7e17f61ff (diff) | |
| download | php-git-8d2c1f58a16c4343204cc828bae6291c1064d565.tar.gz | |
Fixed refcounting
| -rw-r--r-- | ext/reflection/php_reflection.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 45a719e64b..d2583621e3 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -5038,7 +5038,9 @@ ZEND_METHOD(reflection_property, setValue) ZVAL_COPY_VALUE(&garbage, variable_ptr); /* if we assign referenced variable, we should separate it */ - Z_ADDREF_P(value); + if (Z_REFCOUNTED_P(value)) { + Z_ADDREF_P(value); + } if (Z_ISREF_P(value)) { SEPARATE_ZVAL(value); } |
