1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Files
archived-php-src/ext/standard/tests/file/bug39863.phpt
2010-06-05 19:44:48 +00:00

25 lines
363 B
PHP

--TEST--
Bug #39863 (file_exists() silently truncates after a null byte)
--CREDITS--
Andrew van der Stock, vanderaj @ owasp.org
--FILE--
<?php
$filename = __FILE__ . chr(0). ".ridiculous";
if (file_exists($filename)) {
echo "FAIL\n";
}
else {
echo "PASS\n";
}
?>
===DONE===
<?php exit(0); ?>
--XFAIL--
Needs bug #39863 fixed
--EXPECT--
PASS
===DONE===