Ejegg has submitted this change and it was merged.
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(-)
Approvals:
Ejegg: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I9079c3bd61076a4c805f5d284c11aaa4f1653080
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Mwalker <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits