From: Roland Häder Date: Wed, 22 Jun 2022 03:54:25 +0000 (+0200) Subject: Ops, forgot to rename these, too. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=08f55f035816245e066f5b3aca2f5ba8d8555d02;p=friendica.git Ops, forgot to rename these, too. --- diff --git a/src/Util/Images.php b/src/Util/Images.php index 5956406987..9f36f9063e 100644 --- a/src/Util/Images.php +++ b/src/Util/Images.php @@ -140,14 +140,14 @@ class Images */ public static function getMimeTypeBySource(string $sourcefile, string $filename = '', string $default = ''): string { - if (substr($mime, 0, 6) == 'image/') { - Logger::info('Using default mime type', ['filename' => $filename, 'mime' => $mime]); - return $mime; + if (substr($default, 0, 6) == 'image/') { + Logger::info('Using default mime type', ['filename' => $filename, 'mime' => $default]); + return $default; } $image = @getimagesize($sourcefile); if (!empty($image['mime'])) { - Logger::info('Mime type detected via file', ['filename' => $filename, 'default' => $mime, 'image' => $image]); + Logger::info('Mime type detected via file', ['filename' => $filename, 'default' => $default, 'image' => $image]); return $image['mime']; }