Grokbase Groups PHP php-cvs May 2016
FAQ
Commit: 97c530fece03bb42b43137b8542d33a4a09f31c7
Author: Anatol Belski <ab@php.net> Mon, 30 May 2016 12:47:04 +0200
Parents: f6e79af3efd48931573d03a8faa91dce74f6d2af
Branches: PHP-7.0 master

Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=97c530fece03bb42b43137b8542d33a4a09f31c7

Log:
Add test for bug #72258

Bugs:
https://bugs.php.net/72258

Changed paths:
   A ext/zip/tests/bug72258.phpt
   A ext/zip/tests/bug72258.zip


Diff:
diff --git a/ext/zip/tests/bug72258.phpt b/ext/zip/tests/bug72258.phpt
new file mode 100644
index 0000000..0e0c8c1
--- /dev/null
+++ b/ext/zip/tests/bug72258.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #72258 ZipArchive converts fns 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 0000000..07ea2e4
Binary files /dev/null and b/ext/zip/tests/bug72258.zip differ

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-cvs @
categoriesphp
postedMay 30, '16 at 10:51a
activeMay 30, '16 at 10:51a
posts1
users1
websitephp.net

1 user in discussion

Anatol Belski: 1 post

People

Translate

site design / logo © 2019 Grokbase