summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-09-06 01:18:22 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2016-09-06 01:18:22 +0200
commit1928cdcacb3284658682d0cd68ac1ee3cf9cc653 (patch)
tree7e3855767cf6e862a95c51ec9945e57e5b05c673 /ext/zip/php_zip.c
parentcfc83af9780027e97d1d4a17ab5dedb48f6056b1 (diff)
parent81ec843d0ee6a7e236cfab15f1908953d7247677 (diff)
downloadphp-git-1928cdcacb3284658682d0cd68ac1ee3cf9cc653.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r--ext/zip/php_zip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 0bd74d5a6c..779d9d1593 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -238,17 +238,17 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil
return 0;
}
- stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL);
-
- if (stream == NULL) {
+ zf = zip_fopen(za, file, 0);
+ if (zf == NULL) {
n = -1;
goto done;
}
- zf = zip_fopen(za, file, 0);
- if (zf == NULL) {
+ stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL);
+
+ if (stream == NULL) {
n = -1;
- php_stream_close(stream);
+ zip_fclose(zf);
goto done;
}