xref: /PHP-8.0/ext/phar/tests/bug70433.phpt (revision ded3d984)
1--TEST--
2Phar - bug #70433 - Uninitialized pointer in phar_make_dirstream when zip entry filename is "/"
3--SKIPIF--
4<?php if (!extension_loaded("phar") || !extension_loaded("zlib")) die("skip"); ?>
5--FILE--
6<?php
7$phar = new PharData(__DIR__."/bug70433.zip");
8var_dump($phar);
9$meta = $phar->getMetadata();
10var_dump($meta);
11?>
12DONE
13--EXPECT--
14object(PharData)#1 (3) {
15  ["pathName":"SplFileInfo":private]=>
16  string(0) ""
17  ["glob":"DirectoryIterator":private]=>
18  bool(false)
19  ["subPathName":"RecursiveDirectoryIterator":private]=>
20  string(0) ""
21}
22NULL
23DONE
24