From 5d16d55949ead2fc689af4fd0fa058a706b9e263 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sun, 20 Nov 2022 11:33:37 +0100 Subject: [PATCH] MDL-76389 output: Ensure we don't try to iterate over null Just convert nulls to empty array before trying to iterate it. --- lib/outputlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/outputlib.php b/lib/outputlib.php index f44c12e9c18..4e3fdbe5048 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -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) {