diff --git a/sources/Load.php b/sources/Load.php index 4fac62398e..b59fc15e6f 100644 --- a/sources/Load.php +++ b/sources/Load.php @@ -1999,7 +1999,7 @@ function addInlineJavascript($javascript, $defer = false) */ function loadLanguage($template_name, $lang = '', $fatal = true, $force_reload = false) { - global $user_info, $language, $settings, $context, $modSettings; + global $user_info, $language, $settings, $context, $modSettings, $txtBirthdayEmails; global $db_show_debug, $txt; static $already_loaded = array(); @@ -2083,15 +2083,15 @@ function loadLanguage($template_name, $lang = '', $fatal = true, $force_reload = } $txt['emails'] = array(); } - if (!empty($birthdayEmails)) + if (!empty($txtBirthdayEmails)) { - foreach ($birthdayEmails as $key => $value) + foreach ($txtBirthdayEmails as $key => $value) { $txtBirthdayEmails[$key . '_subject'] = $value['subject']; $txtBirthdayEmails[$key . '_body'] = $value['body']; $txtBirthdayEmails[$key . '_author'] = $value['author']; } - $birthdayEmails = array(); + $txtBirthdayEmails = array(); } } diff --git a/sources/ScheduledTasks.php b/sources/ScheduledTasks.php index ca1fd6fd4f..a5c26c49d3 100644 --- a/sources/ScheduledTasks.php +++ b/sources/ScheduledTasks.php @@ -1423,7 +1423,7 @@ function scheduled_fetchFiles() */ function scheduled_birthdayemails() { - global $modSettings, $mbname, $txt, $birthdayEmails; + global $modSettings, $mbname, $txt, $txtBirthdayEmails; $db = database(); @@ -1949,4 +1949,4 @@ function scheduled_remove_old_followups() removeFollowUpsByMessage($remove); return true; -} \ No newline at end of file +}