Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Reproduce Client Bug #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MolloKhan
Copy link

@MolloKhan MolloKhan commented May 20, 2022

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);
    }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant