mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:42:54 +00:00
Update src/Network/GuzzleResponse.php
This commit is contained in:
parent
756f57f198
commit
a338e4cbff
1 changed files with 1 additions and 6 deletions
|
@ -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} */
|
||||
|
|
Loading…
Reference in a new issue