|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-03 14:11 UTC] pierre dot php at gmail dot com
[2007-06-03 14:41 UTC] darwinkid at gmail dot com
[2007-06-03 15:49 UTC] pierre dot php at gmail dot com
[2008-08-12 21:36 UTC] szm001 at tom dot com
[2009-07-20 15:21 UTC] pierre dot php at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 11 14:00:01 2025 UTC |
Description: ------------ PHP crashes when attempting to recreate a directory that already exists in an archive. yes it probably seems like bad practice to attempt to recreate a directory that already exists however, I found this while iterating through files/directories. the submitted code is the simpilest form in which the error can be reproduced. Reproduce code: --------------- <?php // this code crashes php $archive = new ZipArchive(); $archive->open('c:/test.zip', ZIPARCHIVE::CREATE); $archive->addEmptyDir('test'); $archive->addEmptyDir('test'); ?> Expected result: ---------------- the expected result would be for it to completely skip over the directory and or display a E_NOTICE that the directory already exists. Actual result: -------------- when attempting to create a directory that already exists in an archive, PHP crashes.