MDL-83529 Analytics: Upgrade can break if core module is deleted

This commit is contained in:
sam marshall 2024-10-23 15:45:11 +01:00
parent 269a8a8a1b
commit ee6251345d

View File

@ -788,7 +788,7 @@ class manager {
if (preg_match('~^\\\\mod_([^\\\\]+)\\\\~', $indicator, $matches)) {
if (!$allmodules) {
// The first time, get all modules.
$allmodules = \core\plugin_manager::instance()->get_plugins_of_type('mod');
$allmodules = \core\plugin_manager::instance()->get_present_plugins('mod');
}
if (!array_key_exists($matches[1], $allmodules)) {
// Module does not exist, so skip indicator.