@@ -18,7 +18,7 @@ function curl_copy_handle(\CurlHandle $handle): \CurlHandle
18
18
error_clear_last ();
19
19
$ result = \curl_copy_handle ($ handle );
20
20
if ($ result === false ) {
21
- throw CurlException::createFromPhpError ();
21
+ throw CurlException::createFromPhpError ($ handle );
22
22
}
23
23
return $ result ;
24
24
}
@@ -39,7 +39,7 @@ function curl_escape(\CurlHandle $handle, string $string): string
39
39
error_clear_last ();
40
40
$ result = \curl_escape ($ handle , $ string );
41
41
if ($ result === false ) {
42
- throw CurlException::createFromPhpError ();
42
+ throw CurlException::createFromPhpError ($ handle );
43
43
}
44
44
return $ result ;
45
45
}
@@ -64,7 +64,7 @@ function curl_exec(\CurlHandle $handle)
64
64
error_clear_last ();
65
65
$ result = \curl_exec ($ handle );
66
66
if ($ result === false ) {
67
- throw CurlException::createFromPhpError ();
67
+ throw CurlException::createFromPhpError ($ handle );
68
68
}
69
69
return $ result ;
70
70
}
@@ -541,7 +541,7 @@ function curl_getinfo(\CurlHandle $handle, int $option = null)
541
541
$ result = \curl_getinfo ($ handle );
542
542
}
543
543
if ($ result === false ) {
544
- throw CurlException::createFromPhpError ();
544
+ throw CurlException::createFromPhpError ($ handle );
545
545
}
546
546
return $ result ;
547
547
}
@@ -627,7 +627,7 @@ function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_mess
627
627
error_clear_last ();
628
628
$ result = \curl_multi_info_read ($ multi_handle , $ queued_messages );
629
629
if ($ result === false ) {
630
- throw CurlException::createFromPhpError ();
630
+ throw CurlException::createFromPhpError ($ multi_handle );
631
631
}
632
632
return $ result ;
633
633
}
@@ -791,7 +791,7 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value):
791
791
error_clear_last ();
792
792
$ result = \curl_multi_setopt ($ multi_handle , $ option , $ value );
793
793
if ($ result === false ) {
794
- throw CurlException::createFromPhpError ();
794
+ throw CurlException::createFromPhpError ($ multi_handle );
795
795
}
796
796
}
797
797
@@ -3154,7 +3154,7 @@ function curl_setopt(\CurlHandle $handle, int $option, $value): void
3154
3154
error_clear_last ();
3155
3155
$ result = \curl_setopt ($ handle , $ option , $ value );
3156
3156
if ($ result === false ) {
3157
- throw CurlException::createFromPhpError ();
3157
+ throw CurlException::createFromPhpError ($ handle );
3158
3158
}
3159
3159
}
3160
3160
@@ -3173,7 +3173,7 @@ function curl_share_errno(\CurlShareHandle $share_handle): int
3173
3173
error_clear_last ();
3174
3174
$ result = \curl_share_errno ($ share_handle );
3175
3175
if ($ result === false ) {
3176
- throw CurlException::createFromPhpError ();
3176
+ throw CurlException::createFromPhpError ($ share_handle );
3177
3177
}
3178
3178
return $ result ;
3179
3179
}
@@ -3250,7 +3250,7 @@ function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value):
3250
3250
error_clear_last ();
3251
3251
$ result = \curl_share_setopt ($ share_handle , $ option , $ value );
3252
3252
if ($ result === false ) {
3253
- throw CurlException::createFromPhpError ();
3253
+ throw CurlException::createFromPhpError ($ share_handle );
3254
3254
}
3255
3255
}
3256
3256
@@ -3270,7 +3270,7 @@ function curl_unescape(\CurlHandle $handle, string $string): string
3270
3270
error_clear_last ();
3271
3271
$ result = \curl_unescape ($ handle , $ string );
3272
3272
if ($ result === false ) {
3273
- throw CurlException::createFromPhpError ();
3273
+ throw CurlException::createFromPhpError ($ handle );
3274
3274
}
3275
3275
return $ result ;
3276
3276
}
0 commit comments