| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull Requests
Pull requests: 
 HistoryAllCommentsChangesGit/SVN commits             
             [2015-08-21 17:48 UTC] cmb@php.net
 
-Assigned To:
+Assigned To: cmb
  [2015-08-21 17:51 UTC] cmb@php.net
 
-Summary: ZipArchive::close() always returns TRUE
+Summary: ZipArchive::close() doesn't indicate errors
  [2015-08-21 22:00 UTC] cmb@php.net
 
-Status:      Assigned
+Status:      Open
-Assigned To: cmb
+Assigned To:
  [2015-08-21 22:00 UTC] cmb@php.net
  [2015-09-04 22:47 UTC] cmb@php.net
  [2015-09-04 22:47 UTC] cmb@php.net
 
-Status: Open
+Status: Closed
  [2015-09-05 00:06 UTC] cmb@php.net
 
-Assigned To:
+Assigned To: cmb
  [2015-09-15 12:13 UTC] ab@php.net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 03:00:01 2025 UTC | 
Description: ------------ If closing a ZipArchive fails for whatever reason, no error indication is given (ZipArchive::close() returns TRUE), and it is not possible to get further information by calling ZipArchive::getStatusString(), because the internal zip_t has already been closed. Test script: --------------- <?php $zip = new ZipArchive(); var_dump($zip->open('./test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE)); var_dump($zip->close()); ?> Expected result: ---------------- bool(true) bool(false) Actual result: -------------- bool(true) bool(true)