diff options
author | Zeev Suraski <zeev@php.net> | 1999-06-22 19:05:40 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-06-22 19:05:40 +0000 |
commit | 3eac45ea80288498cd3e33eb4bba91181bd6a0c6 (patch) | |
tree | 2afc646b6cf866c077836f698eb8788bfa6e2d55 /Zend/zend_operators.c | |
parent | 31c8ec4c8087c9af9ce55ed4aeecb72a52b477db (diff) | |
download | php-git-3eac45ea80288498cd3e33eb4bba91181bd6a0c6.tar.gz |
* Fix concatenation of arrays (it was PHP 3.0 style, copying zval's instead
of zval *, and it wasn't using reference counting)
* Fix a memory leak in static array()'s with textual indices
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 9496edd5d2..4dc7d4c337 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -390,11 +390,11 @@ ZEND_API int add_function(zval *result, zval *op1, zval *op2) zval op1_copy, op2_copy; if (op1->type == IS_ARRAY && op2->type == IS_ARRAY) { - zval tmp; + zval *tmp; *result = *op1; zval_copy_ctor(result); - zend_hash_merge(result->value.ht,op2->value.ht,(void (*)(void *pData)) zval_copy_ctor, (void *) &tmp, sizeof(zval), 0); + zend_hash_merge(result->value.ht, op2->value.ht, (void (*)(void *pData)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0); return SUCCESS; } zendi_convert_scalar_to_number(op1, op1_copy); |