From: Pratik Joshi Date: Fri, 13 Dec 2013 09:53:33 +0000 (+0530) Subject: CRM-13961 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=29cb51c2e85d85e1bbcfc5a4d5c68e12263b24d7;p=civicrm-core.git CRM-13961 --- diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index f66947bc1f..1cad709712 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -2643,7 +2643,7 @@ WHERE civicrm_mailing_job.id = %1 static function processQueue($mode = NULL) { $config = &CRM_Core_Config::singleton(); - // CRM_Core_Error::debug_log_message("Beginning processQueue run: {$config->mailerJobsMax}, {$config->mailerJobSize}"); + // CRM_Core_Error::debug_log_message("Beginning processQueue run: {$config->mailerJobsMax}, {$config->mailerJobSize}"); if ($mode == NULL && CRM_Core_BAO_MailSettings::defaultDomain() == "EXAMPLE.ORG") { CRM_Core_Error::fatal(ts('The default mailbox has not been configured. You will find more info in the online user and administrator guide', array(1 => CRM_Utils_System::url('civicrm/admin/mailSettings', 'reset=1'), 2 => "http://book.civicrm.org/user/advanced-configuration/email-system-configuration/"))); @@ -2652,8 +2652,8 @@ WHERE civicrm_mailing_job.id = %1 // check if we are enforcing number of parallel cron jobs // CRM-8460 $gotCronLock = FALSE; - if ($config->mailerJobsMax && $config->mailerJobsMax > 1) { + if (property_exists($config, 'mailerJobsMax') && $config->mailerJobsMax && $config->mailerJobsMax > 1) { $lockArray = range(1, $config->mailerJobsMax); shuffle($lockArray); @@ -2680,7 +2680,8 @@ WHERE civicrm_mailing_job.id = %1 // load bootstrap to call hooks // Split up the parent jobs into multiple child jobs - CRM_Mailing_BAO_MailingJob::runJobs_pre($config->mailerJobSize, $mode); + $mailerJobSize = (property_exists($config, 'mailerJobSize')) ? $config->mailerJobSize : NULL; + CRM_Mailing_BAO_MailingJob::runJobs_pre($mailerJobSize, $mode); CRM_Mailing_BAO_MailingJob::runJobs(NULL, $mode); CRM_Mailing_BAO_MailingJob::runJobs_post($mode);