PHRETS
PHRETS copied to clipboard
Call to undefined function GuzzleHttp\Psr7\parse_response()
Hello I'm getting the following error when trying to run a search
Call to undefined function GuzzleHttp\Psr7\parse_response()
Any insight would be greatly appreciated.
@Reddogdesigns I had the same issue, this is because parse_response
has been depreciated and replaced with Message::parseResponse
.
So the solution is to find the Multiple.php
file.
YOUR_APPLICATION_DIRECTORY/vendor/troydavisson/phrets/src/Parsers/GetObject/Multiple.php
And replace line 52:
$parts = \GuzzleHttp\Psr7\parse_response("HTTP/1.1 200 OK\r\n" . $part . "\r\n");
with this:
$parts = \GuzzleHttp\Psr7\Message::parseResponse("HTTP/1.1 200 OK\r\n" . $part . "\r\n");
@samsafay this worked! Thank you so much!!!
A safer workaround is to restrict the PSR7 package version in composer.json
with "guzzlehttp/psr7": "^1.8",
Editing the vendor file is a temporary fix that will be lost as soon as composer update
is ran again.