We have been removing this pass-by-refs on an ongoing basis. CRUD calls should use
the api but I checked the core calls and none are looking for anything altered in
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
- public static function create(&$params) {
+ public static function create(array $params) {
// CRM-#1843
// If it is a mass sms, set url_tracking to false
$params['body_html'] = htmlspecialchars($headerStr) . "\n\n" . $body;
$params['subject'] = $headers['Subject'];
$params['name'] = $headers['Subject'];
- $ids = [];
- $mailing = CRM_Mailing_BAO_Mailing::create($params, $ids);
+ $mailing = CRM_Mailing_BAO_Mailing::create($params);
if (empty($mailing) || is_a($mailing, 'CRM_Core_Error')) {
return PEAR::raiseError('Unable to create spooled mailing.');
$params['scheduled_date'] = CRM_Utils_Date::processDate($mailing->scheduled_date);
}
- CRM_Mailing_BAO_Mailing::create($params, $ids);
+ CRM_Mailing_BAO_Mailing::create($params);
//when user perform mailing from search context
//redirect it to search result CRM-3711