Skip to content

Commit 2964ee6

Browse files
authored
MediaHelper: proper check if file is an image (#42105) (#43345)
1 parent 866e6f1 commit 2964ee6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/src/Helper/MediaHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public function canUpload($file, $component = 'com_media', $allowedExecutables =
277277
// If tmp_name is empty, then the file was bigger than the PHP limit
278278
if (!empty($file['tmp_name'])) {
279279
// Get the mime type this is an image file
280-
$mime = static::getMimeType($file['tmp_name'], true);
280+
$mime = static::getMimeType($file['tmp_name'], static::isImage($file['tmp_name']));
281281

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

0 commit comments

Comments
 (0)