File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ A JSON HTTP client library. This project also is the reference implementation fo
14
14
``` {json}
15
15
{
16
16
"require": {
17
- "chroma-x/json-http-client": "~3 .0"
17
+ "chroma-x/json-http-client": "~4 .0"
18
18
}
19
19
}
20
20
```
Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ public function __construct(array $bodyData)
22
22
$ this ->bodyData = $ bodyData ;
23
23
}
24
24
25
- public function configureCurl (\CurlHandle $ curl ): self
25
+ public function configureCurl (\CurlHandle | false $ curl ): self
26
26
{
27
+ if ($ curl === false ) {
28
+ throw new \TypeError ('cURL is not a valid CurlHandle class. ' );
29
+ }
30
+
27
31
$ jsonBody = json_encode ($ this ->bodyData );
28
32
if ($ jsonBody === false ) {
29
33
throw new HttpRequestMessageException ('JSON body data not serializable. ' );
You can’t perform that action at this time.
0 commit comments