1--TEST-- 2Bug #8009 (cannot add again same entry to an archive) 3--SKIPIF-- 4<?php 5if(!extension_loaded('zip')) die('skip'); 6?> 7--FILE-- 8<?php 9$thisdir = __DIR__; 10$src = $thisdir . "/bug8009.zip"; 11$filename = $thisdir . "/tmp8009.zip"; 12copy($src, $filename); 13 14$zip = new ZipArchive(); 15 16if (!$zip->open($filename)) { 17 exit("cannot open $filename\n"); 18} 19$zip->addFromString("2.txt", "=)"); 20$zip->close(); 21unlink($filename); 22echo "status: " . $zip->status . "\n"; 23echo "\n"; 24?> 25--EXPECT-- 26status: 0 27