Commit a8d0fb42291 for php.net
commit a8d0fb4229122001de78c0e095b20360acfad19a
Author: NickSdot <32384907+NickSdot@users.noreply.github.com>
Date: Fri Aug 14 00:10:32 2026 +0700
ext/curl: Test exception type in curl_read_function_error_on_int.phpt
Follow up to #22757
diff --git a/ext/curl/tests/curl_read_function_error_on_int.phpt b/ext/curl/tests/curl_read_function_error_on_int.phpt
index 30ba9773772..0b4d86e07b4 100644
--- a/ext/curl/tests/curl_read_function_error_on_int.phpt
+++ b/ext/curl/tests/curl_read_function_error_on_int.phpt
@@ -21,10 +21,10 @@ function custom_readfunction($oCurl, $hReadHandle, $iMaxOut)
try {
curl_exec($ch);
} catch (ValueError $e) {
- echo $e->getMessage() . "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
var_dump(curl_error($ch));
?>
--EXPECT--
-The CURLOPT_READFUNCTION callback must return a string or CURL_READFUNC_ABORT or CURL_READFUNC_PAUSE
+ValueError: The CURLOPT_READFUNCTION callback must return a string or CURL_READFUNC_ABORT or CURL_READFUNC_PAUSE
string(29) "operation aborted by callback"