Bug #70322 [Com]: ZipArchive::close() doesn't indicate errors

From: Date: Thu, 05 Mar 2020 05:46:19 +0000
Subject: Bug #70322 [Com]: ZipArchive::close() doesn't indicate errors
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225892@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 Comment by: ppopjuu19 at gmail dot com Reported by: cmb@php.net Summary: ZipArchive::close() doesn't indicate errors Status: Closed Type: Bug Package: Zip Related Operating System: * PHP Version: 5.6.12 Assigned To: cmb Block user comment: N Private report: N New Comment: https://sbbkings.com/pussy888/ https://sbbkings.com/starvegas/ https://sbbkings.com/918kiss/ Previous Comments: ------------------------------------------------------------------------ [2015-09-15 12:13:40] ab@php.net 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 ------------------------------------------------------------------------ [2015-09-04 22:47:51] cmb@php.net 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 ------------------------------------------------------------------------ [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 (#225892) next »