Add default values for Status record

This commit is contained in:
Isaac Connor 2019-09-25 10:13:56 -04:00
parent afd10e49d6
commit 475432449f
1 changed files with 3 additions and 0 deletions

View File

@ -151,6 +151,9 @@ private $status_fields = array(
$row = dbFetchOne($sql, NULL, array($this->{'Id'}));
if ( !$row ) {
Error('Unable to load Monitor record for Id='.$this->{'Id'});
foreach ( $this->status_fields as $k => $v ) {
$this->{$k} = $v;
}
} else {
foreach ($row as $k => $v) {
$this->{$k} = $v;