2007-08-22 06:45:53 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #42364 (Crash when using getRealPath with DirectoryIterator)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$it = new DirectoryIterator(dirname(__FILE__));
|
|
|
|
|
2007-11-03 03:41:12 +08:00
|
|
|
$count = 0;
|
|
|
|
|
2007-08-22 06:45:53 +08:00
|
|
|
foreach ($it as $e) {
|
2007-11-03 03:41:12 +08:00
|
|
|
$count++;
|
|
|
|
$type = gettype($e->getRealPath());
|
|
|
|
if ($type != "string" && $type != "unicode") {
|
2007-08-22 06:45:53 +08:00
|
|
|
echo $e->getFilename(), " is a ", gettype($e->getRealPath()), "\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-11-03 03:41:12 +08:00
|
|
|
if ($count > 0) {
|
|
|
|
echo "Found $count entries!\n";
|
|
|
|
}
|
2009-07-05 22:46:08 +08:00
|
|
|
?>
|
|
|
|
===DONE===
|
2007-11-03 03:41:12 +08:00
|
|
|
--EXPECTF--
|
|
|
|
Found %i entries!
|
2007-08-22 06:45:53 +08:00
|
|
|
===DONE===
|