ResponsiveFilemanager
ResponsiveFilemanager copied to clipboard
link to image directory gives error message
In some cases link to image directory gives error message instead of the list of images available, One //little// fix for you "could be"
File: ~upload/modules/lib_r_filemanager/filemanager/include/php_image_magician.php
Line: ~2723
if(function_exists("mime_content_type")) { $extension = mime_content_type($file); $extension = fix_strtolower($extension); $extension = str_replace('image/', '', $extension); } else { $aTemp = explode(".", $file); $sType = array_pop($aTemp); $extension = strTolower($sType); }
Sorry for bad display of code...
I noticed this issue as well. I was getting PHP error messages when attempting to access the images directory. I never really understood this bit of code in "PHP image magician" because it doesn't analyze the MIME type for any useful reason, it just wants the file extension, so why not just use pathinfo
. I replaced $extension = mime_content_type($file);
with
$extension = pathinfo($file, PATHINFO_EXTENSION);
and it fixed the issue.