1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/spl/tests/gh15918.phpt
Niels Dossche 9774cedb01 Fix GH-15918: Assertion failure in ext/spl/spl_fixedarray.c
SplFixedArray should've never get supported in ArrayObject because it's
overloaded, and so that breaks assumptions. This regressed in c4ecd82f.

Closes GH-15947.
2024-09-20 17:34:23 +02:00

14 lines
322 B
PHP

--TEST--
GH-15918 (Assertion failure in ext/spl/spl_fixedarray.c)
--FILE--
<?php
$foo = new SplFixedArray(5);
try {
$arrayObject = new ArrayObject($foo);
} catch (InvalidArgumentException $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Overloaded object of type SplFixedArray is not compatible with ArrayObject