From: Alice Frumin Date: Tue, 19 Jul 2016 16:04:46 +0000 (-0400) Subject: updating foreach of smarty elements to work with mailContent array X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eff0a941b67ab93cb73b782d234e0b8b5471cd82;p=civicrm-core.git updating foreach of smarty elements to work with mailContent array --- diff --git a/CRM/Core/BAO/MessageTemplate.php b/CRM/Core/BAO/MessageTemplate.php index d9b15c4a0c..2fbc9bff10 100644 --- a/CRM/Core/BAO/MessageTemplate.php +++ b/CRM/Core/BAO/MessageTemplate.php @@ -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)