MDL-76389 output: Ensure we don't try to iterate over null

Just convert nulls to empty array before trying to iterate it.
This commit is contained in:
Eloy Lafuente (stronk7)
2022-11-20 11:42:02 +01:00
parent 2da8a31849
commit 5d16d55949
+1 -1
View File
@@ -963,7 +963,7 @@ class theme_config {
$files['plugin_'.$plugin] = $sheetfile;
}
$subplugintypes = core_component::get_subplugins("editor_{$plugin}");
$subplugintypes = core_component::get_subplugins("editor_{$plugin}") ?? [];
// Fetch sheets for any editor subplugins.
foreach ($subplugintypes as $plugintype => $subplugins) {
foreach ($subplugins as $subplugin) {