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