mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Fix a bug where the default value for function argument could be an
array with array (!) keys.
This commit is contained in:
parent
9f53c8e313
commit
c009a4f361
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue