mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix #2012
This commit is contained in:
parent
cd2006f8b7
commit
50bfff5502
1 changed files with 2 additions and 0 deletions
|
@ -274,6 +274,7 @@ ZEND_API void zval_update_constant(zval *p)
|
||||||
{
|
{
|
||||||
if (p->type == IS_CONSTANT) {
|
if (p->type == IS_CONSTANT) {
|
||||||
zval c;
|
zval c;
|
||||||
|
int refcount = p->refcount;
|
||||||
|
|
||||||
if (!zend_get_constant(p->value.str.val, p->value.str.len, &c)) {
|
if (!zend_get_constant(p->value.str.val, p->value.str.len, &c)) {
|
||||||
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
|
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
|
||||||
|
@ -285,6 +286,7 @@ ZEND_API void zval_update_constant(zval *p)
|
||||||
*p = c;
|
*p = c;
|
||||||
}
|
}
|
||||||
INIT_PZVAL(p);
|
INIT_PZVAL(p);
|
||||||
|
p->refcount = refcount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue