From c009a4f361fdb97fc6296dab268c44c4793a61cc Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Thu, 23 Feb 2006 18:06:47 +0000 Subject: [PATCH] Fix a bug where the default value for function argument could be an array with array (!) keys. --- Zend/zend_compile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 5feda66bfe..f96fd44332 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3227,6 +3227,9 @@ void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr) case IS_DOUBLE: zend_hash_index_update(result->u.constant.value.ht, (long)offset->u.constant.value.dval, &element, sizeof(zval *), NULL); break; + case IS_CONSTANT_ARRAY: + zend_error(E_ERROR, "Illegal offset type"); + break; } } else { zend_hash_next_index_insert(result->u.constant.value.ht, &element, sizeof(zval *), NULL); -- 2.50.1