[php-src] master: ext/zip: Remove libzip < 1.0 compatibility code (#25080)

From: Date: Sat, 31 Oct 2026 16:41:35 +0000
Subject: [php-src] master: ext/zip: Remove libzip < 1.0 compatibility code (#25080)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143080@lists.php.net to get a copy of this message
Author: Weilin Du (LamentXU123) Committer: GitHub (web-flow) Pusher: LamentXU123 Date: 2026-11-01T00:41:32+08:00 Commit: https://github.com/php/php-src/commit/248c5c45409667b5e69bba38a92c5cc9edd7582a Raw diff: https://github.com/php/php-src/commit/248c5c45409667b5e69bba38a92c5cc9edd7582a.diff ext/zip: Remove libzip < 1.0 compatibility code (#25080) Since we ain't supporting libzip < 1.0.0 anymore. Changed paths: M ext/zip/php_zip.c Diff: diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 5baecfc18933..a278a3d6ac8c 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -138,26 +138,15 @@ static char * php_zip_make_relative_path(char *path, size_t path_len) /* {{{ */ /* }}} */ /* {{{ php_zip_file_error - Entry error code, plus its message when message is not NULL. - zip_error_t and its accessors only exist since libzip 1.0. */ + Entry error code, plus its message when message is not NULL. */ static int php_zip_file_error(struct zip_file *zf, const char **message) { -#if LIBZIP_VERSION_MAJOR < 1 - int zep, syp; - - zip_file_error_get(zf, &zep, &syp); - if (message) { - *message = zip_file_strerror(zf); - } - return zep; -#else zip_error_t *err = zip_file_get_error(zf); if (message) { *message = zip_error_strerror(err); } return zip_error_code_zip(err); -#endif } /* }}} */

« previous php.cvs (#143080) next »