1--TEST-- 2Phar: Bug #46060: addEmptyDir() breaks 3--SKIPIF-- 4<?php if (!extension_loaded("phar")) die("skip"); ?> 5<?php if (getenv('SKIP_SLOW_TESTS')) die('skip'); ?> 6--INI-- 7phar.require_hash=0 8--FILE-- 9<?php 10$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; 11$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.tar'; 12 13$phar = new PharData($fname); 14$phar->addEmptyDir('blah/'); 15$phar->addFromString('test/', ''); 16 17copy($fname, $fname2); 18$phar = new PharData($fname2); 19 20var_dump($phar['blah']->isDir(), $phar['test']->isDir()); 21?> 22===DONE=== 23--CLEAN-- 24<?php 25unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); 26unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); 27__HALT_COMPILER(); 28?> 29--EXPECT-- 30bool(true) 31bool(false) 32===DONE=== 33