KazV2/dockers/framadate/patch/find_polls.php.patch

18 lines
921 B
Diff
Raw Permalink Normal View History

2024-06-03 18:43:35 +02:00
--- find_polls.php 2022-02-05 09:09:45.256310389 +0100
+++ find_polls.php-new 2022-02-05 09:07:28.072305772 +0100
@@ -43,8 +43,12 @@
$smarty->assign('polls', $polls);
$body = $smarty->fetch('mail/find_polls.tpl');
- $mailService->send($mail, __('FindPolls', 'List of your polls') . ' - ' . NOMAPPLICATION, $body, 'SEND_POLLS');
- $message = new Message('success', __('FindPolls', 'Polls sent'));
+ try {
+ $mailService->send($mail, __('FindPolls', 'List of your polls') . ' - ' . NOMAPPLICATION, $body, 'SEND_POLLS');
+ $message = new Message('success', __('FindPolls', 'Polls sent'));
+ } catch (Exception $e) {
+ $message = new Message('warning', __('Error', 'No polls found'));
+ }
} else {
$message = new Message('warning', __('Error', 'No polls found'));
}