瀏覽代碼

Check variables to avoid notice

Yannick Warnier 10 年之前
父節點
當前提交
18d0d7e5a0
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      main/admin/system_announcements.php

+ 3 - 3
main/admin/system_announcements.php

@@ -209,11 +209,11 @@ if ($action_todo) {
                     $values['visible_guest'],
                     $values['lang'],
                     $sendMail,
-                    $values['add_to_calendar'],
-                    $values['send_email_test']
+                    empty($values['add_to_calendar'])?false:true,
+                    empty($values['send_email_test'])?false:true
                 );
 
-                if ($announcement_id !== false)  {
+                if ($announcement_id !== false) {
                     SystemAnnouncementManager::announcement_for_groups($announcement_id, array($values['group']));
                     Display :: display_confirmation_message(get_lang('AnnouncementAdded'));
                 } else {