diff options
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index be35c2d2b1..9bb4b524de 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -499,7 +499,7 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v char *result; #endif glob_t globbuf; - int n; + uint n; int ret; if (pattern_len >= MAXPATHLEN) { @@ -958,6 +958,14 @@ static int php_zip_has_property(zval *object, zval *member, int type, void **cac } /* }}} */ +static HashTable *php_zip_get_gc(zval *object, zval **gc_data, int *gc_data_count) /* {{{ */ +{ + *gc_data = NULL; + *gc_data_count = 0; + return zend_std_get_properties(object); +} +/* }}} */ + static HashTable *php_zip_get_properties(zval *object)/* {{{ */ { ze_zip_object *obj; @@ -1686,7 +1694,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* if (add_path) { if ((add_path_len + file_stripped_len) > MAXPATHLEN) { - php_error_docref(NULL, E_WARNING, "Entry name too long (max: %d, %pd given)", + php_error_docref(NULL, E_WARNING, "Entry name too long (max: %d, %zd given)", MAXPATHLEN - 1, (add_path_len + file_stripped_len)); zval_ptr_dtor(return_value); RETURN_FALSE; @@ -2995,7 +3003,7 @@ static const zend_function_entry zip_class_functions[] = { ZIPARCHIVE_ME(getExternalAttributesIndex, arginfo_ziparchive_getextattrindex, ZEND_ACC_PUBLIC) ZIPARCHIVE_ME(setCompressionName, arginfo_ziparchive_setcompname, ZEND_ACC_PUBLIC) ZIPARCHIVE_ME(setCompressionIndex, arginfo_ziparchive_setcompindex, ZEND_ACC_PUBLIC) - {NULL, NULL, NULL} + PHP_FE_END }; /* }}} */ @@ -3014,6 +3022,7 @@ static PHP_MINIT_FUNCTION(zip) zip_object_handlers.clone_obj = NULL; zip_object_handlers.get_property_ptr_ptr = php_zip_get_property_ptr_ptr; + zip_object_handlers.get_gc = php_zip_get_gc; zip_object_handlers.get_properties = php_zip_get_properties; zip_object_handlers.read_property = php_zip_read_property; zip_object_handlers.has_property = php_zip_has_property; |