mirror of
https://github.com/php/php-src.git
synced 2026-04-11 18:13:00 +02:00
Fixed refcounting
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user