mirror of
https://github.com/php/php-src.git
synced 2026-10-29 02:07:35 +08:00
15 lines
333 B
PHP
15 lines
333 B
PHP
--TEST--
|
|
Bug #54292 (Wrong parameter causes crash in SplFileObject::__construct())
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
new SplFileObject('foo', array());
|
|
} catch (TypeError $e) {
|
|
echo $e::class, ': ', $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
TypeError: SplFileObject::__construct(): Argument #2 ($mode) must be of type string, array given
|