diff --git a/src/Network/GuzzleResponse.php b/src/Network/GuzzleResponse.php index 72d87ae9f..18155d1d2 100644 --- a/src/Network/GuzzleResponse.php +++ b/src/Network/GuzzleResponse.php @@ -88,7 +88,13 @@ class GuzzleResponse extends Response implements IHTTPResult, ResponseInterface /** {@inheritDoc} */ public function getContentType() { - return implode($this->getHeader('Content-Type')); + $contentTypes = $this->getHeader('Content-Type') ?? []; + $countTypes = count($contentTypes); + if ($countTypes > 0) { + return $contentTypes[$countTypes - 1]; + } else { + return ''; + } } /** {@inheritDoc} */ diff --git a/src/Util/Images.php b/src/Util/Images.php index e0375da3d..1b52b91a1 100644 --- a/src/Util/Images.php +++ b/src/Util/Images.php @@ -77,7 +77,7 @@ class Images * * @param string $image_data Image data * @param string $filename File name (for guessing the type via the extension) - * @param string $mimeTypes possible mime type + * @param string $mimeType possible mime type * * @return string * @throws \Exception