php-8.0.30-src/ext/spl/tests/bug54292.phpt

15 lines
317 B
PHP

--TEST--
Bug #54292 (Wrong parameter causes crash in SplFileObject::__construct())
--FILE--
<?php
try {
new SplFileObject('foo', array());
} catch (TypeError $e) {
var_dump($e->getMessage());
}
?>
--EXPECT--
string(85) "SplFileObject::__construct(): Argument #2 ($mode) must be of type string, array given"