summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug54291.phpt
blob: b15a3723d47e1a0fc61a073312064f80c93170f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--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 UnexpectedValueException: Failed to open directory "" in %s:%d
Stack trace:
#0 %s(%d): DirectoryIterator->__construct('\x00/abc')
#1 {main}
  thrown in %s on line %d