Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined function GuzzleHttp\Psr7\parse_response() #294

Open
Reddogdesigns opened this issue Aug 10, 2021 · 3 comments
Open

Call to undefined function GuzzleHttp\Psr7\parse_response() #294

Reddogdesigns opened this issue Aug 10, 2021 · 3 comments

Comments

@Reddogdesigns
Copy link

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.

@samsafay
Copy link

@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");

@Reddogdesigns
Copy link
Author

@samsafay this worked! Thank you so much!!!

@BrandonSurowiec
Copy link

BrandonSurowiec commented Dec 1, 2021

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.

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

No branches or pull requests

3 participants