Merge branch 'PHP-8.3'

* PHP-8.3:
  Fix GH-15918: Assertion failure in ext/spl/spl_fixedarray.c
This commit is contained in:
Niels Dossche 2024-09-20 17:34:54 +02:00
commit 1b171bb6b4
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5
4 changed files with 26 additions and 21 deletions

View file

@ -964,7 +964,7 @@ static void spl_array_set_array(zval *object, spl_array_object *intern, zval *ar
}
} else {
zend_object_get_properties_t handler = Z_OBJ_HANDLER_P(array, get_properties);
if (handler != zend_std_get_properties) {
if (handler != zend_std_get_properties || Z_OBJ_HANDLER_P(array, get_properties_for)) {
zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0,
"Overloaded object of type %s is not compatible with %s",
ZSTR_VAL(Z_OBJCE_P(array)->name), ZSTR_VAL(intern->std.ce->name));