From: Andrei Zmievski Date: Thu, 23 Feb 2006 18:06:47 +0000 (+0000) Subject: Fix a bug where the default value for function argument could be an X-Git-Tag: php-5.1.3RC1~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c009a4f361fdb97fc6296dab268c44c4793a61cc;p=php Fix a bug where the default value for function argument could be an array with array (!) keys. --- 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);