Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/155473

Change subject: pacify tests
......................................................................

pacify tests

Change-Id: I9079c3bd61076a4c805f5d284c11aaa4f1653080
---
M sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/73/155473/1

diff --git 
a/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
index 8c62687..df7412e 100644
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
+++ b/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
@@ -17,7 +17,9 @@
             'city' => '',
             'comment' => '',
             'contact_id' => mt_rand(),
+            'contact_tags' => array(),
             'contribution_recur_id' => mt_rand(),
+            'contribution_tags' => array(),
             'contribution_tracking_id' => mt_rand(),
             'contribution_tracking_update' => '1',
             'contribution_type' => 'cash',
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index ee5ed64..8cc8b12 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -354,8 +354,9 @@
         'source_enqueued_time',
     );
     foreach ( $date_mangle as $field ) {
-        if ( is_numeric( $custom_vars[$field] )
-            and strlen( $custom_vars[$field] ) < 14
+        if ( array_key_exists( $field, $custom_vars )
+            && is_numeric( $custom_vars[$field] )
+            && strlen( $custom_vars[$field] ) < 14
         ) {
             $custom_vars[$field] = wmf_common_date_unix_to_sql( 
$custom_vars[$field] );
         }

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

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

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

Reply via email to