mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix - forgot to split away if refcount>1
This commit is contained in:
parent
68e54e9922
commit
fa7c418b79
2 changed files with 9 additions and 1 deletions
|
@ -292,7 +292,12 @@ ZEND_API int zval_update_constant(zval **pp)
|
|||
|
||||
if (p->type == IS_CONSTANT) {
|
||||
zval c;
|
||||
int refcount = p->refcount;
|
||||
int refcount;
|
||||
|
||||
SEPARATE_ZVAL(pp);
|
||||
p = *pp;
|
||||
|
||||
refcount = p->refcount;
|
||||
|
||||
if (!zend_get_constant(p->value.str.val, p->value.str.len, &c)) {
|
||||
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
|
||||
|
@ -306,6 +311,8 @@ ZEND_API int zval_update_constant(zval **pp)
|
|||
INIT_PZVAL(p);
|
||||
p->refcount = refcount;
|
||||
} else if (p->type == IS_ARRAY) {
|
||||
SEPARATE_ZVAL(pp);
|
||||
p = *pp;
|
||||
zend_hash_apply(p->value.ht, (int (*)(void *)) zval_update_constant);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -115,6 +115,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
|
|||
case IS_LONG:
|
||||
case IS_NULL:
|
||||
break;
|
||||
case IS_CONSTANT:
|
||||
case IS_STRING:
|
||||
if (zvalue->value.str.val) {
|
||||
if (zvalue->value.str.len==0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue