BUGFIX Side reports weren't working on initial opening of the side tab

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63804 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-10-08 01:49:49 +00:00
parent 1e578a32cb
commit e6815f2156

View File

@ -722,8 +722,8 @@ HTML;
*/ */
function sidereport() { function sidereport() {
$reportClass = $this->urlParams['ID']; $reportClass = $this->urlParams['ID'];
$report = new $reportClass(); $report = ClassInfo::exists($reportClass) ? new $reportClass() : false;
return $report->getHTML(); return $report ? $report->getHTML() : false;
} }
/** /**
* Get the versions of the current page * Get the versions of the current page