<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
* @param string $filename filename
* @return mixed array or string
*/
- public static function getContentType($filename)
+ public static function getContentType(string $filename)
{
$mime_types = [
'zsh' => 'text/x-script.zsh'
];
- $dot = strpos($filename, '.');
+ $dot = strrpos($filename, '.');
if ($dot !== false) {
$ext = strtolower(substr($filename, $dot + 1));
if (array_key_exists($ext, $mime_types)) {