1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.5'

* PHP-8.5:
  Core: fix missing deprecation when accessing null array key with JIT (#20883)
This commit is contained in:
Alexandre Daubois
2026-01-30 16:19:57 +01:00
3 changed files with 6 additions and 3 deletions

2
NEWS
View File

@@ -11,6 +11,8 @@ PHP NEWS
. Fix OSS-Fuzz #429429090 (Failed assertion on unset() with uninitialized
container). (ilutov)
. Fixed GH-20564 (Don't call autoloaders with pending exception). (ilutov)
. Fix deprecation now showing when accessing null key of an array with JIT.
(alexandre-daubois)
- Date:
. Update timelib to 2022.16. (Derick)

View File

@@ -363,8 +363,7 @@ static inline zend_result zval_to_string_offset(zend_long *result, zval *op) {
static inline zend_result fetch_array_elem(zval **result, zval *op1, zval *op2) {
switch (Z_TYPE_P(op2)) {
case IS_NULL:
*result = zend_hash_find(Z_ARR_P(op1), ZSTR_EMPTY_ALLOC());
return SUCCESS;
return FAILURE;
case IS_FALSE:
*result = zend_hash_index_find(Z_ARR_P(op1), 0);
return SUCCESS;

View File

@@ -30,7 +30,7 @@ function foo() {
}
foo();
?>
--EXPECT--
--EXPECTF--
int(1)
int(3)
int(2)
@@ -38,6 +38,8 @@ int(1)
int(3)
int(1)
int(2)
Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
int(4)
int(5)
int(5)