Fixed a condition that could cause an object not found error.
This commit is contained in:
parent
885cc431c9
commit
67c36c5e7b
@ -101,7 +101,7 @@ class PresentationCategoryPage_Controller extends Page_Controller {
|
||||
|
||||
function LatestPresentation()
|
||||
{
|
||||
return $this->Presentations()->first();
|
||||
if ($this->Presentations()) return $this->Presentations()->first();
|
||||
}
|
||||
|
||||
|
||||
@ -146,4 +146,4 @@ class PresentationCategoryPage_Controller extends Page_Controller {
|
||||
echo "Presentation URLS updated.";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user