xref: /PHP-7.4/ext/zip/tests/bug72258.phpt (revision 26dfce7f)
1--TEST--
2Bug #72258 ZipArchive converts filenames to unrecoverable form
3--SKIPIF--
4<?php
5if(!extension_loaded('zip')) die('skip');
6?>
7--FILE--
8<?php
9
10$fn = __DIR__ . DIRECTORY_SEPARATOR . "bug72258.zip";
11
12$zip = new \ZipArchive();
13$res = $zip->open($fn);
14if ($res !== true) {
15		echo 'Error opening: ' . $res;
16			die();
17}
18
19for ($i = 0; $i < $zip->numFiles; $i++) {
20	$fnInArc = $zip->getNameIndex($i, ZipArchive::FL_ENC_RAW);
21	var_dump($fnInArc);
22}
23?>
24--EXPECT--
25string(6) "�����/"
26