From 08f55f035816245e066f5b3aca2f5ba8d8555d02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 22 Jun 2022 05:54:25 +0200 Subject: [PATCH] Ops, forgot to rename these, too. --- src/Util/Images.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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']; } -- 2.39.5