Skip to content

Commit 11a0fdd

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: Update NEWS entry for curl 8.16 update 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 a463ede + 5eb6a81 commit 11a0fdd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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
$ch = null;
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)