diff --git a/filemanager/inc/class.filemanager_hooks.inc.php b/filemanager/inc/class.filemanager_hooks.inc.php index 3557495930..af44a039fb 100644 --- a/filemanager/inc/class.filemanager_hooks.inc.php +++ b/filemanager/inc/class.filemanager_hooks.inc.php @@ -234,15 +234,21 @@ class filemanager_hooks } $editorLink = self::getEditorLink(); $mimes = array(); - foreach ($editorLink['mime'] as $mime => $value) - { - $mimes[$mime] = lang('%1 file', strtoupper($value['ext'])).' ('.$mime.')'; - if (!empty($value['extra_extensions'])) + if (is_array($editorLink['mime'])){ + + foreach ($editorLink['mime'] as $mime => $value) { - $mimes[$mime] .= ', '.strtoupper(implode(', ', $value['extra_extensions'])); + $mimes[$mime] = lang('%1 file', strtoupper($value['ext'])).' ('.$mime.')'; + + if (!empty($value['extra_extensions'])) + { + $mimes[$mime] .= ', '.strtoupper(implode(', ', $value['extra_extensions'])); + } } + } + $merge_open_handler = array ('download' => lang('download'), 'collabora' => 'Collabora'); $document_doubleclick_action = array ( 'collabora' => lang('open documents with Collabora, if permissions are given'),