]> git.mxchange.org Git - friendica.git/commitdiff
Revert "Use last entry for Content-Type"
authorPhilipp <admin@philipp.info>
Sun, 11 Oct 2020 21:25:14 +0000 (23:25 +0200)
committerPhilipp <admin@philipp.info>
Sun, 11 Oct 2020 21:25:14 +0000 (23:25 +0200)
This reverts commit e17befb7

src/Network/GuzzleResponse.php

index 18155d1d292901cf2ac2fea194086cdccd3d8fa6..72d87ae9fe94d1ec8145391fd0322efe999d0639 100644 (file)
@@ -88,13 +88,7 @@ class GuzzleResponse extends Response implements IHTTPResult, ResponseInterface
        /** {@inheritDoc} */
        public function getContentType()
        {
-               $contentTypes = $this->getHeader('Content-Type') ?? [];
-               $countTypes = count($contentTypes);
-               if ($countTypes > 0) {
-                       return $contentTypes[$countTypes - 1];
-               } else {
-                       return '';
-               }
+               return implode($this->getHeader('Content-Type'));
        }
 
        /** {@inheritDoc} */