[5.1] Change redirect url (from headers['Location']) from array to string #43734
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the error:
parse_url(): Argument #1 ($url) must be of type string, array given
Summary of Changes
This PR fixes the same issue that was fixed for the CurlTransport:
a406543
Pull Request for Issue ##42769.
From the Laminas\Diactoros\MessageTrait::getHeaders() doc
@return array Returns an associative array of the message's headers. Each key MUST be a header name, and each value MUST be an array of strings.
PR https://github.com/joomla/joomla-cms/pull/43130/files#diff-eaa7b598c95837c0e0230852d37007e28938d2bfe13048b42462ce106803447fL133 fixes the same issue, but this PR isolates the fix for the above mentioned error.
Testing Instructions
The same testing Instructions as in #42769 but instead of 'curl' use 'socket'.
Actual result BEFORE applying this Pull Request
error:
parse_url(): Argument #1 ($url) must be of type string, array given
Expected result AFTER applying this Pull Request
no error
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed