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/bug77431.phpt
Nikita Popov 68195bd481 Update ext/spl parameter names
Closes GH-6284.
2020-10-07 12:26:46 +02:00

13 lines
354 B
PHP

--TEST--
Bug #77431 (SplFileInfo::__construct() accepts NUL bytes)
--FILE--
<?php
new SplFileInfo("bad\0good");
?>
--EXPECTF--
Fatal error: Uncaught ValueError: SplFileInfo::__construct(): Argument #1 ($filename) must not contain any null bytes in %s:%d
Stack trace:
#0 %s(%d): SplFileInfo->__construct('bad\x00good')
#1 {main}
thrown in %s on line %d