summaryrefslogtreecommitdiff
path: root/ext/zip/tests/bug72258.phpt
blob: 4612cc26f08f9ad130ebef5c7660eec00b91f66c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Bug #72258 ZipArchive converts filenames to unrecoverable form
--SKIPIF--
<?php
if(!extension_loaded('zip')) die('skip');
?>
--FILE--
<?php

$fn = __DIR__ . DIRECTORY_SEPARATOR . "bug72258.zip";

$zip = new \ZipArchive();
$res = $zip->open($fn);
if ($res !== true) {
        echo 'Error opening: ' . $res;
            die();
}

for ($i = 0; $i < $zip->numFiles; $i++) {
    $fnInArc = $zip->getNameIndex($i, ZipArchive::FL_ENC_RAW);
    var_dump($fnInArc);
}
?>
--EXPECT--
string(6) "/"