Update src/Network/GuzzleResponse.php

pull/10619/head
Philipp 2021-08-20 19:48:23 +02:00
rodzic 756f57f198
commit a338e4cbff
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 9A28B7D4FF5667BD
1 zmienionych plików z 1 dodań i 6 usunięć

Wyświetl plik

@ -89,12 +89,7 @@ class GuzzleResponse extends Response implements IHTTPResult, ResponseInterface
public function getContentType()
{
$contentTypes = $this->getHeader('Content-Type') ?? [];
$countTypes = count($contentTypes);
if ($countTypes > 0) {
return $contentTypes[$countTypes - 1];
} else {
return '';
}
return array_pop($contentTypes) ?? '';
}
/** {@inheritDoc} */