From 1d29a61eb34c20b415ef41477130b3800d928783 Mon Sep 17 00:00:00 2001
From: Christopher <cityofoaksdesign@gmail.com>
Date: Wed, 28 Aug 2024 20:38:33 -0400
Subject: [PATCH] Issue #3386185 by mglaman, c_archer: Cast subject to string
 before passing to SDK

---
 src/Plugin/Mail/SendGridMail.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Plugin/Mail/SendGridMail.php b/src/Plugin/Mail/SendGridMail.php
index e496559..5a12072 100644
--- a/src/Plugin/Mail/SendGridMail.php
+++ b/src/Plugin/Mail/SendGridMail.php
@@ -269,7 +269,7 @@ class SendGridMail implements MailInterface, ContainerFactoryPluginInterface {
     }
 
     $sendgrid_message->addCategories($categories);
-    $personalization0->setSubject($message['subject']);
+    $personalization0->setSubject((string) $message['subject']);
     $from = new From($data['from'], $data['fromname']);
     unset($data);
     # Set the from address and add a name if it exists.
-- 
GitLab