mirror of
https://github.com/php/php-src.git
synced 2026-03-26 09:12:14 +01:00
Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
23 lines
512 B
PHP
23 lines
512 B
PHP
--TEST--
|
|
Bug #70019 Files extracted from archive may be placed outside of destination directory
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("phar") || !extension_loaded('zlib')) die("skip"); ?>
|
|
--FILE--
|
|
<?php
|
|
$dir = __DIR__."/bug70019";
|
|
$phar = new PharData(__DIR__."/bug70019.zip");
|
|
if(!is_dir($dir)) {
|
|
mkdir($dir);
|
|
}
|
|
$phar->extractTo($dir);
|
|
var_dump(file_exists("$dir/ThisIsATestFile.txt"));
|
|
?>
|
|
--CLEAN--
|
|
<?php
|
|
$dir = __DIR__."/bug70019";
|
|
unlink("$dir/ThisIsATestFile.txt");
|
|
rmdir($dir);
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|