updating foreach of smarty elements to work with mailContent array
authorAlice Frumin <alice@aghstrategies.com>
Tue, 19 Jul 2016 16:04:46 +0000 (12:04 -0400)
committerAlice Frumin <alice@aghstrategies.com>
Tue, 19 Jul 2016 16:04:46 +0000 (12:04 -0400)
CRM/Core/BAO/MessageTemplate.php

index d9b15c4a0c78eaaea9bb198ad56b1b151c047c62..2fbc9bff10f073cfbd74d3a58c0bf8299d2867d0 100644 (file)
@@ -489,11 +489,11 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate {
       $smarty->assign($name, $value);
     }
     foreach (array(
-               'subject',
-               'text',
-               'html',
-             ) as $elem) {
-      $$elem = $smarty->fetch("string:{$$elem}");
+      'subject',
+      'text',
+      'html',
+    ) as $elem) {
+      $mailContent[$elem] = $smarty->fetch("string:{$mailContent[$elem]}");
     }
 
     // send the template, honouring the target user’s preferences (if any)