php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as entry name"); \
RETURN_FALSE; \
} \
- if (zip_stat(za, path, flags, &sb)) { \
+ if (zip_stat(za, path, flags, &sb) == -1) { \
RETURN_FALSE; \
}
/* }}} */
size_t file_basename_len;
int is_dir_only = 0;
- if (file_len >= MAXPATHLEN || zip_stat(za, file, 0, &sb)) {
+ if (file_len >= MAXPATHLEN || zip_stat(za, file, 0, &sb) != 0) {
return 0;
}
long flags = 0;
struct zip_stat sb;
+ int res = 0;
+
if (!this) {
RETURN_FALSE;
}
&name, &name_len, UG(ascii_conv), &flags) == FAILURE) {
return;
}
+ res =zip_stat(intern, name, flags, &sb);
+ if (res == -1) {
+ RETURN_FALSE;
+ }
PHP_ZIP_STAT_PATH(intern, name, name_len, flags, sb);
RETURN_FALSE;
}
- if (pathto_len<1) {
+ if (pathto_len < 1) {
RETURN_FALSE;
}
if (php_stream_stat_path(pathto, &ssb) < 0) {
ret = php_stream_mkdir(pathto, 0777, PHP_STREAM_MKDIR_RECURSIVE, NULL);
if (!ret) {
- efree(pathto);
RETURN_FALSE;
}
}
RETURN_FALSE;
}
- if (!php_zip_extract_file(intern, pathto, file, file_len TSRMLS_CC)) {
+ if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_files), Z_STRLEN_P(zval_files) TSRMLS_CC)) {
efree(file);
RETURN_FALSE;
}
}
if (!php_zip_extract_file(intern, pathto, file, file_len TSRMLS_CC)) {
- efree(file);
RETURN_FALSE;
}
break;
}
for (i = 0; i < filecount; i++) {
- file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED);
+ char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED);
if (!php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) {
RETURN_FALSE;
}
return;
}
- if (zip_stat(intern, filename, 0, &sb)) {
+ if (zip_stat(intern, filename, 0, &sb) != 0) {
RETURN_FALSE;
}