aboutsummaryrefslogtreecommitdiffstats
path: root/mail/roundcube-automatic_addressbook/files/patch-automatic__addressbook.php
blob: 02dd4fd59b4061376233b67d08dd2f18553b1bac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- automatic_addressbook.php.orig	2017-01-26 08:10:28 UTC
+++ automatic_addressbook.php
@@ -129,9 +129,9 @@ class automatic_addressbook extends rcube_plugin
             );
         } else {
             $all_recipients = array_merge(
-                rcube_mime::decode_address_list($headers['To'], null, true, $headers['charset']),
-                rcube_mime::decode_address_list($headers['Cc'], null, true, $headers['charset']),
-                rcube_mime::decode_address_list($headers['Bcc'], null, true, $headers['charset'])
+                @rcube_mime::decode_address_list($headers['To'], null, true, $headers['charset']),
+                @rcube_mime::decode_address_list($headers['Cc'], null, true, $headers['charset']),
+                @rcube_mime::decode_address_list($headers['Bcc'], null, true, $headers['charset'])
             );
         }
 
@@ -284,7 +284,7 @@ class automatic_addressbook extends rcube_plugin
         if ($args['source'] !== $this->abook_id) {
             foreach (array('email:home', 'email:work', 'email:other') as $email_field) {
                 // Would trigger a warning with rc 0.5 without this if
-                if ($args['record'][$email_field]) {
+                if (@$args['record'][$email_field]) {
                     foreach ($args['record'][$email_field] as $email) {
                         $contact_emails[] = $email;
                     }