Permalink
Browse files

MDL-50412 admin: prevent fatal errors on reports admin page

  • Loading branch information...
danpoltawski committed Oct 9, 2015
1 parent e6311ee commit 9b8d2eda4d65c85db564f8099fac2eeea6f0f559
Showing with 6 additions and 2 deletions.
  1. +6 −2 admin/reports.php
View
@@ -50,7 +50,8 @@
$table->setup();
$plugins = array();
foreach (core_component::get_plugin_list('report') as $plugin => $plugindir) {
$availableplugins = core_component::get_plugin_list('report');
foreach ($availableplugins as $plugin => $plugindir) {
if (get_string_manager()->string_exists('pluginname', 'report_' . $plugin)) {
$strpluginname = get_string('pluginname', 'report_' . $plugin);
} else {
@@ -80,7 +81,10 @@
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
$stores = $logmanager->get_supported_logstores('report_' . $plugin);
$stores = array();
if (isset($availableplugins[$plugin])) {
$stores = $logmanager->get_supported_logstores('report_' . $plugin);
}
if ($stores === false) {
$supportedstores = get_string('logstorenotrequired', 'admin');
} else if (!empty($stores)) {

0 comments on commit 9b8d2ed

Please sign in to comment.