* create parent job if not yet created
* condition on the existence of a scheduled date
*/
- if (!empty($params['scheduled_date'])) {
+ if (!empty($params['scheduled_date']) && $params['scheduled_date'] != 'null') {
$job = new CRM_Mailing_BAO_MailingJob();
$job->mailing_id = $mailing->id;
$job->status = 'Scheduled';
if ($rejectOptionID &&
$params['approval_status_id'] == $rejectOptionID
) {
- $params['scheduled_id'] = NULL;
- $params['scheduled_date'] = NULL;
+ $params['scheduled_id'] = 'null';
+ $params['scheduled_date'] = 'null';
// also delete any jobs associated with this mailing
$job = new CRM_Mailing_BAO_MailingJob();
}
else {
// reset them in case this mailing was rejected
- $params['approver_id'] = NULL;
- $params['approval_date'] = NULL;
- $params['approval_status_id'] = NULL;
+ $params['approver_id'] = 'null';
+ $params['approval_date'] = 'null';
+ $params['approval_status_id'] = 'null';
}
/* Build the mailing object */