bug77431.phpt 354 B

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