summaryrefslogtreecommitdiff
path: root/ext/zip/tests/oo_delete.phpt
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2015-08-21 22:26:26 +0200
committerChristoph M. Becker <cmb@php.net>2015-09-05 00:34:10 +0200
commitc77f783777e0169b2a4b7b9439cad76b372290a3 (patch)
treec1370e0d681d44fa142b051f6dbbd5ef26180a7c /ext/zip/tests/oo_delete.phpt
parent4b1dff6f438f84f7694df701b68744edbdd86153 (diff)
downloadphp-git-c77f783777e0169b2a4b7b9439cad76b372290a3.tar.gz
Fix #70322: ZipArchive::close() doesn't indicate errors
If an archive can't be written, ZipArchive::close() nonetheless returns TRUE. We fix the return value to properly return success, and additionally raise a warning on failure.
Diffstat (limited to 'ext/zip/tests/oo_delete.phpt')
-rw-r--r--ext/zip/tests/oo_delete.phpt3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/zip/tests/oo_delete.phpt b/ext/zip/tests/oo_delete.phpt
index 9eac821734..69c6151d5c 100644
--- a/ext/zip/tests/oo_delete.phpt
+++ b/ext/zip/tests/oo_delete.phpt
@@ -63,7 +63,8 @@ $sb = $zip->statIndex(1);
var_dump($sb);
$sb = $zip->statIndex(2);
var_dump($sb);
-$zip->close();
+// suppress irrelevant error message:
+@$zip->close();
unset($zip);
if (file_exists($file)) {