Fixed a condition that could cause an object not found error.

This commit is contained in:
Todd Morey 2014-10-31 13:11:06 -05:00 committed by Sebastian Marcet
parent 885cc431c9
commit 67c36c5e7b
1 changed files with 2 additions and 2 deletions

View File

@ -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.";
}
}
}