deepl-php-lib
deepl-php-lib copied to clipboard
Reproduce Client Bug
Reproducer of #43
If you reset the $curl
instance right before handling the response the error goes away
// BabyMarkt\DeepL\Client
public function request($url, $body = '', $method = 'POST')
{
...
if ($this->curl && is_resource($this->curl)) {
curl_close($this->curl);
}
$this->curl = curl_init();
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);
return $this->handleResponse($response, $httpCode);
}