1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/phar/tests/bug66960.phpt
Christoph M. Becker 0b04b9347f Enclose contents of CLEAN sections in PHP tags
We also place the CLEAN sections before EXPECT(F), and remove
extraneous clean-ups.
2020-04-29 09:07:53 +02:00

27 lines
632 B
PHP

--TEST--
Bug #66960 phar long filename crash
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.readonly = 0
memory_limit = -1
--FILE--
<?php
$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
$phar = new Phar($file);
var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN-1)));
var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN)));
var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN+1)));
echo 'done';
?>
--CLEAN--
<?php
$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
unlink($file);
?>
--EXPECT--
bool(false)
bool(false)
bool(false)
done