Fix errors parsing in FirebaseTransport

This commit is contained in:
Jérémy Derussé 2020-09-15 08:06:04 +02:00
parent 393e5c4f4a
commit 2818e2cd43
No known key found for this signature in database
GPG Key ID: 2083FA5758C473D2

View File

@ -73,7 +73,7 @@ final class FirebaseTransport extends AbstractTransport
'json' => array_filter($options),
]);
$contentType = $response->getHeaders(false)['Content-Type'] ?? '';
$contentType = $response->getHeaders(false)['content-type'][0] ?? '';
$jsonContents = 0 === strpos($contentType, 'application/json') ? $response->toArray(false) : null;
if (200 !== $response->getStatusCode()) {