Skip to content

Commit 201b358

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Update NEWS with info about curl 8.16 compat fixes Fix curl_setopt_ssl test for curl 8.16 Fix more curl 8.16 issues Fix curl 8.16.0 compilation with zts Fix curl build failure on macOS+curl 8.16
2 parents a6e8158 + 810aed1 commit 201b358

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ PHP NEWS
208208
. Fixed bug GH-19397 (mb_list_encodings() can cause crashes on shutdown).
209209
(nielsdos)
210210

211+
- Curl:
212+
. Fix curl build and test failures with version 8.16.
213+
(nielsdos, ilutov, Jakub Zelenka)
214+
211215
- Opcache:
212216
. Reset global pointers to prevent use-after-free in zend_jit_status().
213217
(Florian Engelhardt)

ext/curl/tests/curl_setopt_ssl.phpt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ if ($curl_version['version_number'] < 0x074700) {
1818
--FILE--
1919
<?php
2020

21-
function check_error(CurlHandle $ch) {
21+
function check_error(CurlHandle $ch, $expected = null) {
2222
if (curl_errno($ch) !== 0) {
23-
echo "CURL ERROR: " . curl_errno($ch) . "\n";
23+
$errno = curl_errno($ch);
24+
if (!is_null($expected)) {
25+
$errno = $errno == $expected ? 'EXPECTED' : "UNEXPECTED(A:$errno,E:$expected)";
26+
}
27+
echo "CURL ERROR: " . $errno . "\n";
2428
}
2529
}
2630

@@ -109,7 +113,7 @@ try {
109113

110114
$response = curl_exec($ch);
111115
check_response($response, $clientCertSubject);
112-
check_error($ch);
116+
check_error($ch, curl_version()['version_number'] < 0x081000 ? 58 : 43);
113117
curl_close($ch);
114118

115119
echo "\n";
@@ -203,7 +207,7 @@ bool(true)
203207
bool(true)
204208
bool(true)
205209
client cert subject not in response
206-
CURL ERROR: 58
210+
CURL ERROR: EXPECTED
207211

208212
case 4: client cert and key from file
209213
bool(true)

0 commit comments

Comments
 (0)