Bug #70322 [Opn->Csd]: ZipArchive::close() doesn't indicate errors

From: Date: Fri, 04 Sep 2015 22:47:51 +0000
Subject: Bug #70322 [Opn->Csd]: ZipArchive::close() doesn't indicate errors
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195772@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70322&edit=1 ID: 70322 Updated by: cmb@php.net Reported by: cmb@php.net Summary: ZipArchive::close() doesn't indicate errors -Status: Open +Status: Closed Type: Bug Package: Zip Related Operating System: * PHP Version: 5.6.12 Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=c77f783777e0169b2a4b7b9439cad76b372290a3 Log: Fix #70322: ZipArchive::close() doesn't indicate errors Previous Comments: ------------------------------------------------------------------------ [2015-08-21 22:00:39] cmb@php.net Submitted PR #1481. ------------------------------------------------------------------------ [2015-08-21 17:47:44] cmb@php.net 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) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70322&edit=1

« previous php.bugs (#195772) next »