We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$http = JHttpFactory::getHttp(new JRegistry,'socket'); $response = $http->get(JURI::root(), [], 1 ); var_dump($response);
//JURI::root() redirects to JURI::root() . '/en/';
response of the final destination
joomla error utf8_decode(): Argument ($string) must be of type string, array given (JROOT/libraries/vendor/joomla/uri/src/UriHelper.php:42)
SocketTransport::request class itself with $content->headers['Location'] however $content->headers['Location'] is an array.
the new Uri($content->headers['Location']) then fails, using getHeaderLine solves the issue
// Follow Http redirects if ($content->code >= 301 && $content->code < 400 && isset($content->headers['Location'])) { return $this->request($method, new Uri($content->getHeaderLine('location')), $data, $headers, $timeout, $userAgent); }
The text was updated successfully, but these errors were encountered:
Solved in #43734
Sorry, something went wrong.
No branches or pull requests
Steps to reproduce the issue
$http = JHttpFactory::getHttp(new JRegistry,'socket');
$response = $http->get(JURI::root(), [], 1 );
var_dump($response);
//JURI::root() redirects to JURI::root() . '/en/';
Expected result
response of the final destination
Actual result
joomla error
utf8_decode(): Argument ($string) must be of type string, array given (JROOT/libraries/vendor/joomla/uri/src/UriHelper.php:42)
SocketTransport::request class itself with $content->headers['Location'] however $content->headers['Location'] is an array.
the new Uri($content->headers['Location']) then fails, using getHeaderLine solves the issue
The text was updated successfully, but these errors were encountered: