diff options
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); |