1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Fix missing error check in curl_multi_init()
This commit is contained in:
Niels Dossche
2024-01-16 19:36:03 +01:00
2 changed files with 10 additions and 2 deletions

3
NEWS
View File

@@ -6,6 +6,9 @@ PHP NEWS
. Fixed timer leak in zend-max-execution-timers builds. (withinboredom)
. Fixed bug GH-12349 (linking failure on ARM with mold). (Jan Palus)
- Curl:
. Fix missing error check in curl_multi_init(). (divinity76)
- FPM:
. Fixed bug GH-12996 (Incorrect SCRIPT_NAME with Apache ProxyPassMatch when
plus in path). (Jakub Zelenka)

View File

@@ -60,12 +60,17 @@ static inline php_curlm *curl_multi_from_obj(zend_object *obj) {
PHP_FUNCTION(curl_multi_init)
{
php_curlm *mh;
CURLM *multi;
ZEND_PARSE_PARAMETERS_NONE();
multi = curl_multi_init();
if (UNEXPECTED(multi == NULL)) {
zend_throw_error(NULL, "%s(): Could not initialize a new cURL multi handle", get_active_function_name());
RETURN_THROWS();
}
object_init_ex(return_value, curl_multi_ce);
mh = Z_CURL_MULTI_P(return_value);
mh->multi = curl_multi_init();
mh->multi = multi;
zend_llist_init(&mh->easyh, sizeof(zval), _php_curl_multi_cleanup_list, 0);
}