IcingaConfig: throw exception when missing

This commit is contained in:
Thomas Gelf 2015-07-24 10:58:02 +02:00
parent 747ea70a33
commit 753d9420c3
1 changed files with 5 additions and 0 deletions

View File

@ -227,6 +227,11 @@ class IcingaConfig
array('checksum', 'last_activity_checksum')
)->where('checksum = ?', $this->dbBin($checksum));
$result = $this->db->fetchRow($query);
if (empty($result)) {
throw new Exception(sprintf('Got no config for %s', Util::binary2hex($checksum)));
}
$this->checksum = $result->checksum;
$this->lastActivityChecksum = $result->last_activity_checksum;