Added check for when the custom field doesn't exist
- suppressed cron supervisor error
This commit is contained in:
@ -22,8 +22,9 @@ class Supervisor {
|
||||
return $this->startDaemon();
|
||||
}
|
||||
if(
|
||||
!$this->force_start &&
|
||||
in_array($this->daemon['status'], array('stopped', 'stopping'))
|
||||
!$this->force_start
|
||||
&& isset($this->daemon['status'])
|
||||
&& in_array($this->daemon['status'], array('stopped', 'stopping'))
|
||||
) {
|
||||
return $this->daemon['status'];
|
||||
}
|
||||
|
@ -13,8 +13,12 @@ class SubscriberCustomField extends Model {
|
||||
}
|
||||
|
||||
static function createOrUpdate($data = array()) {
|
||||
$custom_field = CustomField::findOne($data['custom_field_id'])->asArray();
|
||||
if($custom_field === false) return false;
|
||||
$custom_field = CustomField::findOne($data['custom_field_id']);
|
||||
if($custom_field === false) {
|
||||
return false;
|
||||
} else {
|
||||
$custom_field = $custom_field->asArray();
|
||||
}
|
||||
|
||||
if($custom_field['type'] === 'date') {
|
||||
if(is_array($data['value'])) {
|
||||
|
Reference in New Issue
Block a user