From 3eac45ea80288498cd3e33eb4bba91181bd6a0c6 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Tue, 22 Jun 1999 19:05:40 +0000 Subject: * 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 --- Zend/zend_operators.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zend/zend_operators.c') 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); -- cgit v1.2.1