Fix showing a contact throwing an exception

This commit is contained in:
Eric Lippmann 2014-09-30 10:11:40 +02:00
parent ab8436dea8
commit 23c1097577
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class Monitoring_ShowController extends Controller
public function init()
{
$this->view->object = MonitoredObject::fromParams($this->params);
if ($this->view->object->fetch() === false) {
if ($this->view->object && $this->view->object->fetch() === false) {
throw new Zend_Controller_Action_Exception($this->translate('Host or service not found'));
}