diff options
| author | Zeev Suraski <zeev@php.net> | 2000-04-26 22:10:06 +0000 |
|---|---|---|
| committer | Zeev Suraski <zeev@php.net> | 2000-04-26 22:10:06 +0000 |
| commit | fa7c418b79b99b2cc16f53ba3bd11b9c7aabc74c (patch) | |
| tree | 6f8f5522f6ec1c83fadb701f16572e1714fa3e71 /Zend/zend_execute_API.c | |
| parent | 68e54e9922df701d10990fd6b86911ef29fe0528 (diff) | |
| download | php-git-fa7c418b79b99b2cc16f53ba3bd11b9c7aabc74c.tar.gz | |
Fix - forgot to split away if refcount>1
Diffstat (limited to 'Zend/zend_execute_API.c')
| -rw-r--r-- | Zend/zend_execute_API.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index cf8a98f55b..8b30319425 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -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; |
