Fixed, PHP Warning: Invalid argument supplied for foreach(),cast array

This commit is contained in:
Alexandros Sigalas 2019-03-06 14:18:01 +02:00
parent 6175e88048
commit bc27c94e52

View File

@ -237,9 +237,8 @@ class filemanager_hooks
$editorLink = self::getEditorLink();
$mimes = array();
if (is_array($editorLink['mime'])){
foreach ($editorLink['mime'] as $mime => $value)
foreach ((array)$editorLink['mime'] as $mime => $value)
{
$mimes[$mime] = lang('%1 file', strtoupper($value['ext'])).' ('.$mime.')';
@ -249,8 +248,6 @@ class filemanager_hooks
}
}
}
asort($mimes);
$settings += array (
'sections.2' => array(