Skip to content
Snippets Groups Projects
Commit 58867331 authored by Amine Boulaffas's avatar Amine Boulaffas
Browse files

Issue #3148982 by Project Update Bot: Automated Drupal 9 compatibility fixes

parent c05a9d95
No related branches found
No related tags found
No related merge requests found
......@@ -206,10 +206,10 @@ function sys_cron() {
foreach ($emails_to as $email) {
$result = $mailManager->mail($module, $key, trim($email), $langcode, $params, NULL, TRUE);
if ($result['result'] !== TRUE) {
drupal_set_message(t('There was a problem sending your message and it was not sent.'), 'error');
\Drupal::messenger()->addError(t('There was a problem sending your message and it was not sent.'));
}
else {
drupal_set_message(t('Your message has been sent.'));
\Drupal::messenger()->addStatus(t('Your message has been sent.'));
}
}
$state->set('sys_settings', date('d/m'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment