Fix a bug where the default value for function argument could be an

array with array (!) keys.
This commit is contained in:
Andrei Zmievski 2006-02-23 18:06:47 +00:00
parent 9f53c8e313
commit c009a4f361

View file

@ -3227,6 +3227,9 @@ void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr)
case IS_DOUBLE: case IS_DOUBLE:
zend_hash_index_update(result->u.constant.value.ht, (long)offset->u.constant.value.dval, &element, sizeof(zval *), NULL); zend_hash_index_update(result->u.constant.value.ht, (long)offset->u.constant.value.dval, &element, sizeof(zval *), NULL);
break; break;
case IS_CONSTANT_ARRAY:
zend_error(E_ERROR, "Illegal offset type");
break;
} }
} else { } else {
zend_hash_next_index_insert(result->u.constant.value.ht, &element, sizeof(zval *), NULL); zend_hash_next_index_insert(result->u.constant.value.ht, &element, sizeof(zval *), NULL);