Merge pull request #64 from asig2016/17.1_fix1

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

View File

@ -236,7 +236,9 @@ class filemanager_hooks
} }
$editorLink = self::getEditorLink(); $editorLink = self::getEditorLink();
$mimes = array(); $mimes = array();
foreach ($editorLink['mime'] as $mime => $value)
foreach ((array)$editorLink['mime'] as $mime => $value)
{ {
$mimes[$mime] = lang('%1 file', strtoupper($value['ext'])).' ('.$mime.')'; $mimes[$mime] = lang('%1 file', strtoupper($value['ext'])).' ('.$mime.')';
@ -245,6 +247,7 @@ class filemanager_hooks
$mimes[$mime] .= ', '.strtoupper(implode(', ', $value['extra_extensions'])); $mimes[$mime] .= ', '.strtoupper(implode(', ', $value['extra_extensions']));
} }
} }
asort($mimes); asort($mimes);
$settings += array ( $settings += array (
'sections.2' => array( 'sections.2' => array(