X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FMailing.php;h=a71e5645d96f8ba969693eeecd8be2a227d24634;hb=5d2d8718b77fcf6f74f48f15df7101c79115e975;hp=c29d3d1350e38dd65ce15cd3150358b89d869ead;hpb=892614b976dd7b25c3fd09577ab9ed5ae9e95afb;p=civicrm-core.git diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index c29d3d1350..a71e5645d9 100644 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -594,7 +594,7 @@ function civicrm_api3_mailing_preview($params) { return civicrm_api3_create_success([ 'id' => $mailingID, 'contact_id' => $contactID, - 'subject' => $mime->headers()['Subject'], + 'subject' => CRM_Utils_Array::value('Subject', $mime->headers(), ''), 'body_html' => $mime->getHTMLBody(), 'body_text' => $mime->getTXTBody(), ]);