Handle no default set for array defaults. Fixes Warning when saving WebSite type Monitors

This commit is contained in:
Isaac Connor 2020-05-01 15:32:54 -04:00
parent 9dbeaa2c7b
commit 683bf3f982
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ class ZM_Object {
}
}
} else if ( array_key_exists($field, $this->defaults) ) {
if ( is_array($this->defaults[$field]) ) {
if ( is_array($this->defaults[$field]) and isset($this->defaults[$field]['default']) ) {
$default = $this->defaults[$field]['default'];
} else {
$default = $this->defaults[$field];