Skip to content

Commit

Permalink
Merge pull request #22753 from eileenmcnaughton/mail
Browse files Browse the repository at this point in the history
BAO_Mailing::create - stop passing by reference
  • Loading branch information
colemanw authored Feb 17, 2022
2 parents ef29dba + 9a17729 commit b231c84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CRM/Mailing/BAO/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ public static function add(&$params, $ids = []) {
* @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
Expand Down
3 changes: 1 addition & 2 deletions CRM/Mailing/BAO/Spool.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public function send($recipient, $headers, $body, $job_id = NULL) {
$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.');
Expand Down
2 changes: 1 addition & 1 deletion CRM/Mailing/Form/Approve.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function postProcess() {
$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
Expand Down

0 comments on commit b231c84

Please sign in to comment.