Skip to content

Commit

Permalink
[mri_violations] Fix main branch
Browse files Browse the repository at this point in the history
The main branch is failing since aces#8287 because when dashboard
calls getWidgets() on the mri_violations module the module
autoloader hasn't been loaded. This registers the autoloader
when it's called so that the "new" class can be found.
  • Loading branch information
driusan committed Feb 22, 2023
1 parent 1ec65d5 commit 63222f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/mri_violations/php/module.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ class Module extends \Module
$factory = \NDB_Factory::singleton();
$link = $factory->settings()->getBaseURL() . '/' . $this->getName();

if (!class_exists('Provisioner')) {
self::registerAutoloader();
}
$provisioner = new Provisioner();

if ($user->hasPermission('violated_scans_view_allsites')) {
Expand Down

0 comments on commit 63222f6

Please # to comment.