xref: /PHP-7.4/ext/phar/tests/bug71625.phpt (revision c70a938f)
1--TEST--
2Phar - Bug #71625 - Crash in php7.dll
3--INI--
4phar.readonly=0
5--SKIPIF--
6<?php
7
8if (!extension_loaded("phar") || !extension_loaded("zlib")) die("skip");
9if(substr(PHP_OS, 0, 3) != 'WIN' ) {
10    die('skip windows only test');
11}
12if (file_exists('A:')) die('skip drive A: exists');
13
14?>
15--FILE--
16<?php
17$phar = new Phar("A:A:.phar");
18$phar["hello_habr.txt"] = '<? Hello Habr!?>';
19?>
20DONE
21--EXPECTF--
22Fatal error: Uncaught UnexpectedValueException: Cannot create phar 'A:A:.phar', file extension (or combination) not recognised or the directory does not exist in %sbug71625.php:%d
23Stack trace:
24#0 %sbug71625.php(%d): Phar->__construct('A:A:.phar')
25#1 {main}
26  thrown in %sbug71625.php on line %d
27