/** {@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} */
*
* @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