Ejegg has uploaded a new change for review.

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

Change subject: Normalize currency_code to uppercase
......................................................................

Normalize currency_code to uppercase

Be liberal in what you accept. Also, don't call expunge with a
phantom second parameter.

Bug: T108242
Change-Id: Id246591d20640a0b59f9074077ee61e80f478598
---
M gateway_common/DonationData.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 84cce42..939bd20 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -463,8 +463,8 @@
                        $this->logger->debug( "Got currency from 'country', 
now: $currency" );
                }
                
-               $this->setVal( 'currency_code', $currency );
-               $this->expunge( 'currency', $currency );  //honestly, we don't 
want this.
+               $this->setVal( 'currency_code', strtoupper( $currency ) );
+               $this->expunge( 'currency' );  //honestly, we don't want this.
        }
        
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id246591d20640a0b59f9074077ee61e80f478598
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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