Cdentinger has uploaded a new change for review.

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

Change subject: WIP: publishing for visibility, don't merge this
......................................................................

WIP: publishing for visibility, don't merge this

only one test fails with this patch instead of a bunch but i have to
investiage further. php bails when array_key_exists gets a "needle" that
is false (null is fine), because php, and that cascades in weird ways
here.

as far as the remaining test failure we'll see if it happens on jenkins
or not.  was related to server IP in wgRequest

Change-Id: I20b2461d22185cc1950b6844d7be9fcb526c15e1
---
M gateway_common/DonationData.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/60/255060/1

diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index dcae0fa..075f3a8 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -469,7 +469,7 @@
                        $currency = strtoupper( $currency );
                }
                // If it's blank or not a currency code, guess it from the 
country.
-               if ( !array_key_exists( $currency, 
CurrencyRates::getCurrencyRates() ) ) {
+               if ( $currency && !array_key_exists( $currency, 
CurrencyRates::getCurrencyRates() ) ) {
                        //TODO: This is going to fail miserably if there's no 
country yet.
                        $currency = NationalCurrencies::getNationalCurrency( 
$this->getVal( 'country' ) );
                        $this->logger->debug( "Got currency from 'country', 
now: $currency" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20b2461d22185cc1950b6844d7be9fcb526c15e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Cdentinger <cdentin...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to