Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374568 )

Change subject: Fix third param of watchdog() calls
......................................................................

Fix third param of watchdog() calls

Could be null or an empty array, shouldn't skip to the log level.

Change-Id: Ia4803e687700315303acca4fa354bebab16f196a
---
M sites/all/modules/queue2civicrm/unsubscribe/UnsubscribeQueueConsumer.php
M sites/all/modules/thank_you/thank_you.module
2 files changed, 28 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/68/374568/1

diff --git 
a/sites/all/modules/queue2civicrm/unsubscribe/UnsubscribeQueueConsumer.php 
b/sites/all/modules/queue2civicrm/unsubscribe/UnsubscribeQueueConsumer.php
index 6bd51fb..44bcdc2 100644
--- a/sites/all/modules/queue2civicrm/unsubscribe/UnsubscribeQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/unsubscribe/UnsubscribeQueueConsumer.php
@@ -40,13 +40,16 @@
                if ( count( $contacts ) === 0 ) {
                        watchdog( 'unsubscribe',
                                "$contribId: No contacts returned for 
contribution ID. Acking frame and returning.",
+                               array(),
                                WATCHDOG_NOTICE );
                } else {
                        // Excellent -- we have a collection of emails to 
unsubscribe now! :) Check opt out status and add them to the array
                        foreach ( $contacts as $contact ) {
                                if ( $contact['is_opt_out'] == TRUE )
                                {
-                                       watchdog( 'unsubscribe', "$contribId: 
Contact already opted out with this contribution ID.",
+                                       watchdog( 'unsubscribe',
+                                               "$contribId: Contact already 
opted out with this contribution ID.",
+                                               array(),
                                                WATCHDOG_NOTICE );
                                        continue;
                                }
diff --git a/sites/all/modules/thank_you/thank_you.module 
b/sites/all/modules/thank_you/thank_you.module
index 9ee8255..5cca727 100644
--- a/sites/all/modules/thank_you/thank_you.module
+++ b/sites/all/modules/thank_you/thank_you.module
@@ -565,20 +565,40 @@
                        $civi_mailing = $civimail_store->getMailing( 
'thank_you', $template_info->name, $template_info->revision );
                }
                catch ( CiviMailingMissingException $e ) {
-                       watchdog( 'thank_you', 'Could not find mailing record 
for email with subject ' . $subject, WATCHDOG_INFO );
+                       watchdog(
+                               'thank_you',
+                               'Could not find mailing record for email with 
subject ' . $subject,
+                               array(),
+                               WATCHDOG_INFO
+                       );
                        $civi_mailing = $civimail_store->addMailing( 
'thank_you', $template_info->name, 'missing body', $subject, 
$template_info->revision );
                }
                $civi_queue_record = $civimail_store->addQueueRecord( 
$civi_mailing, $email, $contact_id );
                $civimail_store->addActivity( $civi_queue_record, $subject, 
$html );
        }
        catch ( TemplateInfoMissingException $e ) {
-               watchdog( 'thank_you', 'Could not find template info comment in 
thank you email template with subject ' . $subject, WATCHDOG_INFO );
+               watchdog(
+                       'thank_you',
+                       'Could not find template info comment in thank you 
email template with subject ' . $subject,
+                       array(),
+                       WATCHDOG_INFO
+               );
        }
        catch ( CiviQueueInsertException $e ) {
-               watchdog( 'thank_you', 'CiviMail queue insert failed: ' . 
$e->getMessage(), WATCHDOG_INFO );
+               watchdog(
+                       'thank_you',
+                       'CiviMail queue insert failed: ' . $e->getMessage(),
+                       array(),
+                       WATCHDOG_INFO
+               );
        }
        catch ( CiviMailingInsertException $e ) {
-               watchdog( 'thank_you', 'Could not insert fallback mailing: ' . 
$e->getMessage(), WATCHDOG_INFO );
+               watchdog(
+                       'thank_you',
+                       'Could not insert fallback mailing: ' . 
$e->getMessage(),
+                       array(),
+                       WATCHDOG_INFO
+               );
        }
        return $civi_queue_record;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/374568
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4803e687700315303acca4fa354bebab16f196a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to