CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12862] module filemanager 1.6.17 'avif' have bad reference number and another bug

avatar
Created By: Philippe Thomas (filto)
Date Submitted: Thu Oct 01 15:07:09 -0400 2026

Assigned To: Fernando Morgado (JoMorg)
Version: 2.2.24
CMSMS Version: 2.2.24
Severity: Minor
Resolution: None
State: Open
Summary:
module filemanager 1.6.17 'avif' have bad reference number and another bug
Detailed Description:
Modules/FileManager/fileinfo.php

L77
---------------
 18 => 'WEBP',
 20 => 'AVIF',
-----corrected ----------------
18 => 'WEBP',
19 => 'AVIF',
20 => 'HEIF'
-------------------------------------

some files may have no 'channels' info
in this case 'mime' key do not match good key

L9
---------------------------------
// Get the values returned by getimagesize()
 $temp = array_values($temp);

// Make an array using values from $redefine_keys as keys and values from $temp
as values.
foreach ($temp AS $k => $v) {
    $data[$redefine_keys[$k]] = $v;
}
----corrected ---------------------
// Get the values returned by getimagesize()
 $temp = array_values($temp);

// if file have no channels info reorder keys
if(count($temp)<7){
  unset($redefine_keys[5]);
  $redefine_keys = array_values($redefine_keys);
}

// Make an array using values from $redefine_keys as keys and values from $temp
as values.
foreach ($temp AS $k => $v) {
    $data[$redefine_keys[$k]] = $v;
}
-----------------------


History