Skip to content

Commit

Permalink
MDL-83529 Analytics: Upgrade can break if core module is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
sammarshallou committed Nov 15, 2024
1 parent e1d0518 commit f7931a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analytics/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ public static function load_default_models_for_component(string $componentname):
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.
Expand Down

0 comments on commit f7931a5

Please sign in to comment.