mirror of
https://github.com/php/php-src.git
synced 2026-04-28 10:43:30 +02:00
Merge branch 'PHP-8.2'
* PHP-8.2: Fix GH-10570: Assertion `(key)->h != 0 && "Hash must be known"' failed.
This commit is contained in:
@@ -23,6 +23,8 @@ PHP NEWS
|
||||
. Fix bug GH-8821 (Improve line numbers for errors in constant expressions).
|
||||
(ilutov)
|
||||
. Fix bug GH-10083 (Allow comments between & and parameter). (ilutov)
|
||||
. Fixed unknown string hash on property fetch with integer constant name.
|
||||
(nielsdos)
|
||||
|
||||
- Date:
|
||||
. Implement More Appropriate Date/Time Exceptions RFC. (Derick)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
GH-10570 (Assertion `(key)->h != 0 && "Hash must be known"' failed.): constant variation
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new stdClass();
|
||||
for ($i = 0; $i < 2; $i++) {
|
||||
$a->{90};
|
||||
$a->{0} = 0;
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Undefined property: stdClass::$90 in %s on line %d
|
||||
|
||||
Warning: Undefined property: stdClass::$90 in %s on line %d
|
||||
@@ -3038,6 +3038,7 @@ static zend_op *zend_delayed_compile_prop(znode *result, zend_ast *ast, uint32_t
|
||||
opline = zend_delayed_emit_op(result, ZEND_FETCH_OBJ_R, &obj_node, &prop_node);
|
||||
if (opline->op2_type == IS_CONST) {
|
||||
convert_to_string(CT_CONSTANT(opline->op2));
|
||||
zend_string_hash_val(Z_STR_P(CT_CONSTANT(opline->op2)));
|
||||
opline->extended_value = zend_alloc_cache_slots(3);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user