1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00
Files
archived-php-src/ext/spl/tests/bug77431.phpt
Christoph M. Becker ae1fad5bb7 Fix #77431 SplFileInfo::__construct() accepts NUL bytes
`SplFileInfo::__construct()` has to expect a path instead of a string,
analogous to `SplFileObject::__construct()`.
2019-03-03 23:34:00 -08:00

9 lines
263 B
PHP

--TEST--
Bug #77431 (SplFileInfo::__construct() accepts NUL bytes)
--FILE--
<?php
new SplFileInfo("bad\0good");
?>
--EXPECTF--
Fatal error: Uncaught TypeError: SplFileInfo::__construct() expects parameter 1 to be a valid path, string given in %s:%d
Stack trace:%A