Skip to content

Commit

Permalink
[mri_violations] Fix main branch (#8400)
Browse files Browse the repository at this point in the history
The main branch is failing since #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 authored Feb 22, 2023
1 parent 1ec65d5 commit d1209ed
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 d1209ed

Please sign in to comment.