jenkins-bot has submitted this change and it was merged. Change subject: Downgrade log message for empty ffname ......................................................................
Downgrade log message for empty ffname Links to specific gateways from e.g. Ways To Give don't necessarily have ffname specified, but we can figure out which one to show. Still logs an error if an invalid ffname is specified. Change-Id: Ic750486f94a0c4db8eb23bf3e8e83dbd23dc33ab --- M gateway_common/gateway.adapter.php 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index f834c10..be86a22 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -3470,15 +3470,21 @@ $message = "ffname '$ffname' was invalid, but the country-specific '$ffname-$country' works. utm_source = '$utm', referrer = '$ref'"; $this->logger->warning( $message ); } else { - //Invalid form. Go get one that is valid, and squak in the error logs. + //Invalid form. Go get one that is valid, and squawk in the error logs. $new_ff = GatewayFormChooser::getOneValidForm( $country, $currency, $payment_method, $payment_submethod, $recurring, $gateway ); $this->addRequestData( array ( 'ffname' => $new_ff ) ); //now construct a useful error message - $this->logger->error( - "ffname '{$ffname}' is invalid. Assigning ffname '{$new_ff}'. " . - "I currently am choosing for: " . $this->getLogDebugJSON() - ); + $message = "ffname '{$ffname}' is invalid. Assigning ffname '{$new_ff}'. " . + "I currently am choosing for: " . $this->getLogDebugJSON(); + + if ( empty( $ffname ) ) { + // Gateway-specific link didn't specify a form, but we have a + // default. Don't squawk too loud. + $this->logger->warning( $message ); + } else { + $this->logger->error( $message ); + } //Turn these off by setting the LogDebug global to false. $this->logger->debug( "GET: " . json_encode( $_GET ) ); -- To view, visit https://gerrit.wikimedia.org/r/227484 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic750486f94a0c4db8eb23bf3e8e83dbd23dc33ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg <eeggles...@wikimedia.org> Gerrit-Reviewer: Awight <awi...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits