Flexmailer - Refactor unnecessary uses of CRM_Utils_Array::value
authorcolemanw <coleman@civicrm.org>
Fri, 13 Oct 2023 23:45:42 +0000 (19:45 -0400)
committercolemanw <coleman@civicrm.org>
Sat, 14 Oct 2023 03:30:05 +0000 (23:30 -0400)
ext/flexmailer/src/API/MailingPreview.php

index 3d6f1f40f1a49e3df2768e8f07a51d4ccd66e580..448f9b9c09edea44c1e948179829d62c0157531a 100644 (file)
@@ -24,7 +24,7 @@ class MailingPreview {
 
     /** @var \CRM_Mailing_BAO_Mailing $mailing */
     $mailing = new \CRM_Mailing_BAO_Mailing();
-    $mailingID = \CRM_Utils_Array::value('id', $params);
+    $mailingID = $params['id'] ?? NULL;
     if ($mailingID) {
       $mailing->id = $mailingID;
       $mailing->find(TRUE);