File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 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
1414``` {json}
1515{
1616 "require": {
17- "chroma-x/json-http-client": "~3 .0"
17+ "chroma-x/json-http-client": "~4 .0"
1818 }
1919}
2020```
Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ public function __construct(array $bodyData)
2222 $ this ->bodyData = $ bodyData ;
2323 }
2424
25- public function configureCurl (\CurlHandle $ curl ): self
25+ public function configureCurl (\CurlHandle | false $ curl ): self
2626 {
27+ if ($ curl === false ) {
28+ throw new \TypeError ('cURL is not a valid CurlHandle class. ' );
29+ }
30+
2731 $ jsonBody = json_encode ($ this ->bodyData );
2832 if ($ jsonBody === false ) {
2933 throw new HttpRequestMessageException ('JSON body data not serializable. ' );
You can’t perform that action at this time.
0 commit comments