syncrule/history: do not fetch activity if null

This commit is contained in:
Thomas Gelf 2016-05-23 14:29:49 +02:00
parent d435ca37f7
commit 05919baf5d
1 changed files with 8 additions and 6 deletions

View File

@ -162,13 +162,15 @@ class SyncruleController extends ActionController
if ($runId = $this->params->get('run_id')) {
$this->view->run = SyncRun::load($runId, $db);
$this->view->formerId = $db->fetchActivityLogIdByChecksum(
$this->view->run->last_former_activity
);
if ($this->view->run->last_former_activity !== null) {
$this->view->formerId = $db->fetchActivityLogIdByChecksum(
$this->view->run->last_former_activity
);
$this->view->lastId = $db->fetchActivityLogIdByChecksum(
$this->view->run->last_related_activity
);
$this->view->lastId = $db->fetchActivityLogIdByChecksum(
$this->view->run->last_related_activity
);
}
}
}