From: Robin Mitra Date: Tue, 9 Sep 2014 11:46:50 +0000 (+0000) Subject: Fix the bug in CRM_Mailing_BAO_Mailing::add() where the DAO was being instantiated... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=249c99b58061f32e98c58cff8fc2a57e68d562dc;p=civicrm-core.git Fix the bug in CRM_Mailing_BAO_Mailing::add() where the DAO was being instantiated instead of the BAO, as later the create() method expects it to be BAO having getRecipients() method towards the end. --- diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index a7bd0f051f..6202000bc1 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -1482,7 +1482,7 @@ ORDER BY civicrm_email.is_bulkmail DESC CRM_Utils_Hook::pre('create', 'Mailing', NULL, $params); } - $mailing = new CRM_Mailing_DAO_Mailing(); + $mailing = new static(); $mailing->id = $id; $mailing->domain_id = CRM_Utils_Array::value('domain_id', $params, CRM_Core_Config::domainID());