Merge pull request #63 from asig2016/master_fix1

Fixed, PHP Warning: Invalid argument supplied for foreach(), cast array
This commit is contained in:
Ralf Becker 2019-03-06 13:22:26 +01:00 committed by GitHub
commit 15541d08ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -234,7 +234,8 @@ class filemanager_hooks
}
$editorLink = self::getEditorLink();
$mimes = array();
foreach ($editorLink['mime'] as $mime => $value)
foreach ((array)$editorLink['mime'] as $mime => $value)
{
$mimes[$mime] = lang('%1 file', strtoupper($value['ext'])).' ('.$mime.')';
@ -243,6 +244,7 @@ class filemanager_hooks
$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'),