From: Remi Collet Date: Fri, 28 Feb 2020 09:35:39 +0000 (+0100) Subject: Merge branch 'PHP-7.3' into PHP-7.4 X-Git-Tag: php-7.4.7RC1~173 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f0d3f1eab7230031b92fe582fc1f33fd5732576;p=php Merge branch 'PHP-7.3' into PHP-7.4 * PHP-7.3: Fix #79315 ZipArchive::addFile doesn't honor start/length parameters --- 7f0d3f1eab7230031b92fe582fc1f33fd5732576 diff --cc ext/zip/tests/oo_addfile.phpt index 254f2b7620,37320de627..84dea86614 --- a/ext/zip/tests/oo_addfile.phpt +++ b/ext/zip/tests/oo_addfile.phpt @@@ -20,18 -20,11 +20,22 @@@ if (!$zip->open($file)) if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) { echo "failed\n"; } + if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) { + echo "failed\n"; + } if ($zip->status == ZIPARCHIVE::ER_OK) { - dump_entries_name($zip); + if (!verify_entries($zip, [ + "bar", + "foobar/", + "foobar/baz", + "entry1.txt", - "test.php" ++ "test.php", ++ "mini.txt" + ])) { + echo "failed\n"; + } else { + echo "OK"; + } $zip->close(); } else { echo "failed\n"; @@@ -39,4 -37,11 +48,6 @@@ var_dump(strlen($zip->getFromName('mini @unlink($file); ?> --EXPECT-- -0 bar -1 foobar/ -2 foobar/baz -3 entry1.txt -4 test.php -5 mini.txt +OK + bool(true) + bool(true)