summaryrefslogtreecommitdiff
path: root/ext/zip
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-05-30 12:50:25 +0200
committerAnatol Belski <ab@php.net>2016-05-30 12:50:25 +0200
commit38d9b07d7473e1febd70b0aa678dd421b123c0fe (patch)
tree0e7859cf0b388f020df78278b9d8460ca651736c /ext/zip
parentef2ffda0e482e1adbf50b2049bc3064cebd48a66 (diff)
parent933d6b188c62bea6e10e67bea97ac23f51f6ecce (diff)
downloadphp-git-38d9b07d7473e1febd70b0aa678dd421b123c0fe.tar.gz
Merge branch 'PHP-7.0'
* PHP-7.0: fix test title Add test for bug #72258 update UPGRADING Expose missing flags from libzip at least >= 0.11.x
Diffstat (limited to 'ext/zip')
-rw-r--r--ext/zip/tests/bug72258.phpt26
-rw-r--r--ext/zip/tests/bug72258.zipbin0 -> 110 bytes
2 files changed, 26 insertions, 0 deletions
diff --git a/ext/zip/tests/bug72258.phpt b/ext/zip/tests/bug72258.phpt
new file mode 100644
index 0000000000..87ba618450
--- /dev/null
+++ b/ext/zip/tests/bug72258.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #72258 ZipArchive converts filenames to unrecoverable form
+--SKIPIF--
+<?php
+/* $Id$ */
+if(!extension_loaded('zip')) die('skip');
+?>
+--FILE--
+<?php
+
+$fn = dirname(__FILE__) . 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) "/"
diff --git a/ext/zip/tests/bug72258.zip b/ext/zip/tests/bug72258.zip
new file mode 100644
index 0000000000..07ea2e4948
--- /dev/null
+++ b/ext/zip/tests/bug72258.zip
Binary files differ