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--CLEAN-- 23<?php 24unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); 25unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); 26__HALT_COMPILER(); 27?> 28--EXPECT-- 29bool(true) 30bool(false) 31