From 249c99b58061f32e98c58cff8fc2a57e68d562dc Mon Sep 17 00:00:00 2001 From: Robin Mitra Date: Tue, 9 Sep 2014 11:46:50 +0000 Subject: [PATCH] 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. --- CRM/Mailing/BAO/Mailing.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); -- 2.25.1