[php-src] master: Merge branch 'PHP-8.6'
| From: | Weilin Du | Date: | Wed, 11 Nov 2026 11:59:39 +0000 |
| Subject: | [php-src] master: Merge branch 'PHP-8.6' | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-143581@lists.php.net to get a copy of this message | ||
Author: Weilin Du (LamentXU123)
Date: 2026-11-11T19:58:42+08:00
Commit: https://github.com/php/php-src/commit/bd8e73473ee77bb0227bcceb6766cd02a21d4aa3
Raw diff: https://github.com/php/php-src/commit/bd8e73473ee77bb0227bcceb6766cd02a21d4aa3.diff
Merge branch 'PHP-8.6'
On master, remove the obsolete error cleanup and its unused options
parameter. phar_get_archive() returns NULL on errors, so a returned
archive has no error message to free.
* PHP-8.6:
Fix error buffer cleanup in phar_open_parsed_phar() (#25376)
Changed paths:
M ext/phar/phar.c
Diff:
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index bee5fe796ebd..53691bea587a 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -489,7 +489,6 @@ static zend_result phar_open_parsed_phar(
size_t fname_len,
/* copyable & hash update */ zend_string *alias,
bool is_data,
- uint32_t options,
phar_archive_data** pphar,
char **error
) {
@@ -554,10 +553,6 @@ static zend_result phar_open_parsed_phar(
*pphar = NULL;
}
- if (phar && error && !(options & REPORT_ERRORS)) {
- efree(error);
- }
-
return FAILURE;
}
}
@@ -1344,7 +1339,7 @@ ZEND_ATTRIBUTE_NONNULL_ARGS(1, 5, 6) zend_result phar_open_or_create_filename(
return FAILURE;
}
check_file:
- if (phar_open_parsed_phar(ZSTR_VAL(fname), ZSTR_LEN(fname), alias, is_data, options, test,
&my_error) == SUCCESS) {
+ if (phar_open_parsed_phar(ZSTR_VAL(fname), ZSTR_LEN(fname), alias, is_data, test, &my_error)
== SUCCESS) {
*pphar = *test;
if ((*test)->is_data && !(*test)->is_tar && !(*test)->is_zip) {
@@ -1546,7 +1541,7 @@ zend_result phar_open_from_filename(
is_data = true;
}
- if (phar_open_parsed_phar(fname, fname_len, alias, is_data, options, pphar, error) == SUCCESS) {
+ if (phar_open_parsed_phar(fname, fname_len, alias, is_data, pphar, error) == SUCCESS) {
return SUCCESS;
} else if (error && *error) {
return FAILURE;
@@ -2295,7 +2290,7 @@ ZEND_ATTRIBUTE_NONNULL_ARGS(2) zend_result phar_open_executed_filename(/*
copyab
return FAILURE;
}
- if (phar_open_parsed_phar(ZSTR_VAL(fname), ZSTR_LEN(fname), alias, false, REPORT_ERRORS, NULL,
NULL) == SUCCESS) {
+ if (phar_open_parsed_phar(ZSTR_VAL(fname), ZSTR_LEN(fname), alias, false, NULL, NULL) == SUCCESS)
{
return SUCCESS;
}