summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug77431.phpt
blob: 75d5c2d600da44c0f6211b3970292e501a70cdfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--TEST--
Bug #77431 (SplFileInfo::__construct() accepts NUL bytes)
--FILE--
<?php
new SplFileInfo("bad\0good");
?>
--EXPECTF--
Fatal error: Uncaught TypeError: SplFileInfo::__construct(): Argument #1 ($file_name) must be a valid path, string given in %s:%d
Stack trace:
#0 %s(%d): SplFileInfo->__construct('bad\x00good')
#1 {main}
  thrown in %s on line %d