From bc27c94e52ee31d1178fc8a39e334438d52aaba7 Mon Sep 17 00:00:00 2001 From: Alexandros Sigalas Date: Wed, 6 Mar 2019 14:18:01 +0200 Subject: [PATCH] Fixed, PHP Warning: Invalid argument supplied for foreach(),cast array --- filemanager/inc/class.filemanager_hooks.inc.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/filemanager/inc/class.filemanager_hooks.inc.php b/filemanager/inc/class.filemanager_hooks.inc.php index 68ae6d7424..f3d464686b 100644 --- a/filemanager/inc/class.filemanager_hooks.inc.php +++ b/filemanager/inc/class.filemanager_hooks.inc.php @@ -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(