MDL-73702 reports: Fixed report_helper

Made the report_helper make sure there was an action before trying to output it
This commit is contained in:
Frederik Milling Pytlick
2022-01-27 11:04:27 +01:00
parent 1bd5d40c8f
commit c73673f2f3
+6 -4
View File
@@ -51,10 +51,12 @@ class report_helper {
foreach ($children as $key => $node) {
$name = $node->text;
$url = $node->action()->out(false);
$menu[$url] = $name;
if ($name === $pluginname) {
$activeurl = $url;
if ($node->has_action()) {
$url = $node->action()->out(false);
$menu[$url] = $name;
if ($name === $pluginname) {
$activeurl = $url;
}
}
}
}