com php-src: return FALSE instead of NULL from ZipArchive::getStream when php_stream_zip_open() fails (fixes #67 161): ext/zip/php_zip.c
| From: | JulienPauli | Date: | Tue, 12 May 2015 12:32:05 +0000 |
| Subject: | com php-src: return FALSE instead of NULL from ZipArchive::getStream when php_stream_zip_open() fails (fixes #67 161): ext/zip/php_zip.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86691@lists.php.net to get a copy of this message | ||
Commit: c3c87e499644c4db6f55f3a4f2abd0261df86553
Author: Christoph M. Becker <cmbecker69@gmx.de> Fri, 1 May 2015 19:25:31 +0200
Committer: Julien Pauli <jpauli@php.net> Tue, 12 May 2015 14:32:05 +0200
Parents: c9c2794fe6d4d780e17cddfcab3beeefd2ba1667
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c3c87e499644c4db6f55f3a4f2abd0261df86553
Log:
return FALSE instead of NULL from ZipArchive::getStream when php_stream_zip_open() fails (fixes
#67161)
Bugs:
https://bugs.php.net/67161
Changed paths:
M ext/zip/php_zip.c
Diff:
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index a547709..1dd76fc 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -2784,6 +2784,8 @@ static ZIPARCHIVE_METHOD(getStream)
stream = php_stream_zip_open(obj->filename, filename->val, mode STREAMS_CC);
if (stream) {
php_stream_to_zval(stream, return_value);
+ } else {
+ RETURN_FALSE;
}
}
/* }}} */