mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
IcingaConfig: throw exception when missing
This commit is contained in:
parent
747ea70a33
commit
753d9420c3
@ -227,6 +227,11 @@ class IcingaConfig
|
|||||||
array('checksum', 'last_activity_checksum')
|
array('checksum', 'last_activity_checksum')
|
||||||
)->where('checksum = ?', $this->dbBin($checksum));
|
)->where('checksum = ?', $this->dbBin($checksum));
|
||||||
$result = $this->db->fetchRow($query);
|
$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->checksum = $result->checksum;
|
||||||
$this->lastActivityChecksum = $result->last_activity_checksum;
|
$this->lastActivityChecksum = $result->last_activity_checksum;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user