diff options
author | Jakub Zelenka <bukka@php.net> | 2016-02-29 19:28:40 +0000 |
---|---|---|
committer | Jakub Zelenka <bukka@php.net> | 2016-02-29 19:28:40 +0000 |
commit | 80015ba741fc857074050086db6c7b2a4716d6d5 (patch) | |
tree | 9e0b85868c092ae83a0df2bd4f33f79ba773aab2 /ext/zip/php_zip.c | |
parent | 4ea2a0fd60cdf75d746909198ea69f1e3e4ba193 (diff) | |
parent | 31dc08a904f2a91b582396b6ba118abfd12cf246 (diff) | |
download | php-git-80015ba741fc857074050086db6c7b2a4716d6d5.tar.gz |
Merge branch 'PHP-7.0' into openssl_error_store
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index c31ace1f8d..db201af634 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -16,7 +16,6 @@ +----------------------------------------------------------------------+ */ -/* $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -331,7 +330,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char } if (Z_STRLEN_P(option) >= MAXPATHLEN) { - php_error_docref(NULL, E_WARNING, "remove_path string is too long (max: %i, %i given)", + php_error_docref(NULL, E_WARNING, "remove_path string is too long (max: %d, %zd given)", MAXPATHLEN - 1, Z_STRLEN_P(option)); return -1; } @@ -351,7 +350,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char } if (Z_STRLEN_P(option) >= MAXPATHLEN) { - php_error_docref(NULL, E_WARNING, "add_path string too long (max: %i, %i given)", + php_error_docref(NULL, E_WARNING, "add_path string too long (max: %d, %zd given)", MAXPATHLEN - 1, Z_STRLEN_P(option)); return -1; } @@ -1506,7 +1505,7 @@ static ZIPARCHIVE_METHOD(close) ze_obj = Z_ZIP_P(self); if ((err = zip_close(intern))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", zip_strerror(intern)); + php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern)); zip_discard(intern); } @@ -2668,7 +2667,7 @@ static ZIPARCHIVE_METHOD(extractTo) for (i = 0; i < filecount; i++) { char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED); - if (!php_zip_extract_file(intern, pathto, file, strlen(file))) { + if (!file || !php_zip_extract_file(intern, pathto, file, strlen(file))) { RETURN_FALSE; } } @@ -3134,7 +3133,6 @@ static PHP_MINFO_FUNCTION(zip) php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id$"); php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION); php_info_print_table_row(2, "Libzip version", LIBZIP_VERSION); |