1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Files
archived-php-src/ext/spl/tests/bug54291.phpt
Nikita Popov 68195bd481 Update ext/spl parameter names
Closes GH-6284.
2020-10-07 12:26:46 +02:00

14 lines
411 B
PHP

--TEST--
Bug #54291 (Crash iterating DirectoryIterator for dir name starting with \0)
--FILE--
<?php
$dir = new DirectoryIterator("\x00/abc");
$dir->isFile();
?>
--EXPECTF--
Fatal error: Uncaught ValueError: DirectoryIterator::__construct(): Argument #1 ($directory) must not contain any null bytes in %s:%d
Stack trace:
#0 %s(%d): DirectoryIterator->__construct('\x00/abc')
#1 {main}
thrown in %s on line %d