We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents df5edac + dbd4942 commit be8f15eCopy full SHA for be8f15e
1 file changed
src/WP_REST_PSR7_Response.php
@@ -100,6 +100,10 @@ public static function fromPSR7Response(ResponseInterface $response)
100
$headers = [];
101
$responseHeaders = $response->getHeaders();
102
foreach ($responseHeaders as $name => $values) {
103
+ // If for some reason the values is a string, we set it directly
104
+ if (is_string($values)) {
105
+ $headers[$name] = $values;
106
+ }
107
// Set the first value as the header value
108
if (isset($values[0])) {
109
$headers[$name] = $values[0];
0 commit comments