]> granicus.if.org Git - php/commitdiff
Fix #2012
authorZeev Suraski <zeev@php.net>
Tue, 17 Aug 1999 22:31:45 +0000 (22:31 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 17 Aug 1999 22:31:45 +0000 (22:31 +0000)
Zend/zend_execute_API.c

index c71085fe6dac86edf32ceeed39a2a6071ff74719..058c8c338ba4931e7bdd87b36283347b299f774e 100644 (file)
@@ -274,6 +274,7 @@ ZEND_API void zval_update_constant(zval *p)
 {
        if (p->type == IS_CONSTANT) {
                zval c;
+               int 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'",
@@ -285,6 +286,7 @@ ZEND_API void zval_update_constant(zval *p)
                        *p = c;
                }
                INIT_PZVAL(p);
+               p->refcount = refcount;
        }
 }