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:
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user