summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug42364.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/bug42364.phpt')
-rw-r--r--ext/spl/tests/bug42364.phpt12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/spl/tests/bug42364.phpt b/ext/spl/tests/bug42364.phpt
index b218be36af..3ca083e079 100644
--- a/ext/spl/tests/bug42364.phpt
+++ b/ext/spl/tests/bug42364.phpt
@@ -6,13 +6,21 @@ Bug #42364 (Crash when using getRealPath with DirectoryIterator)
<?php
$it = new DirectoryIterator(dirname(__FILE__));
+$count = 0;
+
foreach ($it as $e) {
- if (gettype($e->getRealPath()) != "string") {
+ $count++;
+ $type = gettype($e->getRealPath());
+ if ($type != "string" && $type != "unicode") {
echo $e->getFilename(), " is a ", gettype($e->getRealPath()), "\n";
}
}
+if ($count > 0) {
+ echo "Found $count entries!\n";
+}
echo "===DONE==="
?>
---EXPECT--
+--EXPECTF--
+Found %i entries!
===DONE===