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();
|
return $this->startDaemon();
|
||||||
}
|
}
|
||||||
if(
|
if(
|
||||||
!$this->force_start &&
|
!$this->force_start
|
||||||
in_array($this->daemon['status'], array('stopped', 'stopping'))
|
&& isset($this->daemon['status'])
|
||||||
|
&& in_array($this->daemon['status'], array('stopped', 'stopping'))
|
||||||
) {
|
) {
|
||||||
return $this->daemon['status'];
|
return $this->daemon['status'];
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,12 @@ class SubscriberCustomField extends Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static function createOrUpdate($data = array()) {
|
static function createOrUpdate($data = array()) {
|
||||||
$custom_field = CustomField::findOne($data['custom_field_id'])->asArray();
|
$custom_field = CustomField::findOne($data['custom_field_id']);
|
||||||
if($custom_field === false) return false;
|
if($custom_field === false) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
$custom_field = $custom_field->asArray();
|
||||||
|
}
|
||||||
|
|
||||||
if($custom_field['type'] === 'date') {
|
if($custom_field['type'] === 'date') {
|
||||||
if(is_array($data['value'])) {
|
if(is_array($data['value'])) {
|
||||||
|
Reference in New Issue
Block a user