From: Andi Gutmans Date: Thu, 14 Sep 2000 20:30:06 +0000 (+0000) Subject: - Fix NULL handling in ARRAY opcode and resolve memory leak X-Git-Tag: php-4.0.3RC1~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5418b59681e26f41212fd6232475b8caabe855f0;p=php - Fix NULL handling in ARRAY opcode and resolve memory leak --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 4faf7f0c2b..7721dac703 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1911,7 +1911,11 @@ send_by_ref: case IS_STRING: zend_hash_update(array_ptr->value.ht, offset->value.str.val, offset->value.str.len+1, &expr_ptr, sizeof(zval *), NULL); break; + case IS_NULL: + zend_hash_update(array_ptr->value.ht, "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); + break; default: + zval_ptr_dtor(&expr_ptr); /* do nothing */ break; }