[php-src] Issue #22022: Failed test for CURLOPT_PREREQFUNCTION
| From: | orlitzky | Date: | Tue, 12 May 2026 11:04:02 +0000 |
| Subject: | [php-src] Issue #22022: Failed test for CURLOPT_PREREQFUNCTION | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252067@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/22022
Author: orlitzky
### Description
With the network disabled, we are getting a test failure in
ext/curl/tests/curl_setopt_CURLOPT_PREREQFUNCTION.phpt for the CURL_PREREQFUNC_ABORT case,
```
$ curl_setopt_CURLOPT_PREREQFUNCTION.diff
--
bool(true)
bool(true)
bool(false)
014- string(41) "operation aborted by pre-request callback"
014+ string(63) "failed to open socket: Address family not supported by protocol"
int(42)
bool(true)
--
```
I was about to create a PR to support both error messages, but the
int(42) here is
CURLE_ABORTED_BY_CALLBACK, so now I am wondering why the error message does not agree
with the error number. Maybe it is a real bug?
cc: @Ayesh @Girgias
### PHP Version
```plain
PHP 8.4.21 through git master
```
### Operating System
Gentoo linux (tests run with network disabled)