mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: jit: fixed JIT "Attempt to assign property of non-object" warning emitted at the same time as Error is being thrown
This commit is contained in:
commit
c70219e4aa
2
NEWS
2
NEWS
@ -14,6 +14,8 @@ PHP NEWS
|
||||
- Opcache:
|
||||
. Fixed JIT bug (Function JIT emits "Uninitialized string offset" warning
|
||||
at the same time as invalid offset Error). (Girgias)
|
||||
. Fixed JIT bug (JIT emits "Attempt to assign property of non-object"
|
||||
warning at the same time as Error is being thrown). (Girgias)
|
||||
|
||||
- Standard
|
||||
. Fixed GH-12745 (http_build_query() default null argument for $arg_separator
|
||||
|
@ -1587,7 +1587,9 @@ static void ZEND_FASTCALL zend_jit_assign_dim_op_helper(zval *container, zval *d
|
||||
}
|
||||
zval_ptr_dtor(&res);
|
||||
} else {
|
||||
zend_error(E_WARNING, "Attempt to assign property of non-object");
|
||||
/* Exception is thrown in this case */
|
||||
GC_DELREF(obj);
|
||||
return;
|
||||
}
|
||||
if (UNEXPECTED(GC_DELREF(obj) == 0)) {
|
||||
zend_objects_store_del(obj);
|
||||
|
19
ext/opcache/tests/jit/gh12723-B.phpt
Normal file
19
ext/opcache/tests/jit/gh12723-B.phpt
Normal file
@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
GH-12723: JIT emits "Attempt to assign property of non-object" warning at the same time as Error is being thrown
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$container = new stdClass();
|
||||
|
||||
try {
|
||||
$container[new stdClass()] .= 'append';
|
||||
} catch (\Throwable $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Cannot use object of type stdClass as array
|
Loading…
Reference in New Issue
Block a user