diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-09-15 23:35:56 +0300 |
---|---|---|
committer | Stefan Giehl <stefan@piwik.org> | 2018-09-15 23:35:56 +0300 |
commit | cabcbcb9d5bae0241582b539e993bf5278948fa5 (patch) | |
tree | 463507384ac5f2f7d411ce02902d1baa1b1f68f8 /core/Plugin/ViewDataTable.php | |
parent | 608fd988cdc5404ef76bf8933104a9cbbbae4276 (diff) |
Prevent error related report may not be defined (#13425)
Prevents eg error message ` {"message":"Call to a member function getName() on null","file":"...\/core\/Plugin\/ViewDataTable.php","line":214}`
Diffstat (limited to 'core/Plugin/ViewDataTable.php')
-rw-r--r-- | core/Plugin/ViewDataTable.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Plugin/ViewDataTable.php b/core/Plugin/ViewDataTable.php index 447775f443..226e8f3141 100644 --- a/core/Plugin/ViewDataTable.php +++ b/core/Plugin/ViewDataTable.php @@ -211,6 +211,10 @@ abstract class ViewDataTable implements ViewInterface $relatedReports = $report->getRelatedReports(); if (!empty($relatedReports)) { foreach ($relatedReports as $relatedReport) { + if (!$relatedReport) { + continue; + } + $relatedReportName = $relatedReport->getName(); $this->config->addRelatedReport($relatedReport->getModule() . '.' . $relatedReport->getAction(), |