Fixed refcounting

This commit is contained in:
Dmitry Stogov 2014-02-26 01:09:34 +04:00
parent 9c317c57bc
commit 78fc6b3570

View File

@ -623,7 +623,7 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
}
}
if (Z_REFCOUNT_P(element) > 1) {
if (Z_REFCOUNTED_P(element) && Z_REFCOUNT_P(element) > 1) {
ZVAL_DUP(&new_val, element);
/* preserve this bit for inheritance */