]> granicus.if.org Git - php/commitdiff
Fix a bug where the default value for function argument could be an
authorAndrei Zmievski <andrei@php.net>
Thu, 23 Feb 2006 18:06:47 +0000 (18:06 +0000)
committerAndrei Zmievski <andrei@php.net>
Thu, 23 Feb 2006 18:06:47 +0000 (18:06 +0000)
array with array (!) keys.

Zend/zend_compile.c

index 5feda66bfee33e111fc9c04184cf19762b0ebab0..f96fd44332e92ab3ec8c80f80034659ff1ce646a 100644 (file)
@@ -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);