You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can lead to the following Exception: "Can't buffer() a payload more than once" in /vendor/amphp/byte-stream/src/Payload.php(96)
This happens when there is a response which cannot be parsed successfully. The method $response->getBody()->buffer() is called twice in this situation, resulting in the error above.
A solution for this issue could be to first store the responseBuffer in a local variable, to avoid reading it twice:
In the class
Kelunik/Acme/AcmeService
the following piece of code occurs on multiple occasions in slightly different forms:This can lead to the following Exception: "Can't buffer() a payload more than once" in
/vendor/amphp/byte-stream/src/Payload.php(96)
This happens when there is a response which cannot be parsed successfully. The method
$response->getBody()->buffer()
is called twice in this situation, resulting in the error above.A solution for this issue could be to first store the responseBuffer in a local variable, to avoid reading it twice:
If you prefer I could make a pull request for this
The text was updated successfully, but these errors were encountered: