Skip to content

Commit

Permalink
MediaHelper: proper check if file is an image (#42105) (#43345)
Browse files Browse the repository at this point in the history
  • Loading branch information
coderiekelt authored May 17, 2024
1 parent 866e6f1 commit 2964ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/src/Helper/MediaHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function canUpload($file, $component = 'com_media', $allowedExecutables =
// If tmp_name is empty, then the file was bigger than the PHP limit
if (!empty($file['tmp_name'])) {
// Get the mime type this is an image file
$mime = static::getMimeType($file['tmp_name'], true);
$mime = static::getMimeType($file['tmp_name'], static::isImage($file['tmp_name']));

// Did we get anything useful?
if ($mime != false) {
Expand Down

0 comments on commit 2964ee6

Please sign in to comment.