Katie Horn has uploaded a new change for review.

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

Change subject: Prevents us from hurting ourselves when trying to log things 
during object construction.
......................................................................

Prevents us from hurting ourselves when trying to log things
during object construction.

Change-Id: I9e318da22af4f58becadae6d155a505a32835348
---
M gateway_common/gateway.adapter.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index b0214fc..4064d37 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -394,6 +394,10 @@
         * @return string
         */
        public function getLogMessagePrefix() {
+               if ( !is_object( $this->dataObj ) ) {
+                       //please avoid exploding; It's just a log line.
+                       return 'Constructing!';
+               }
                return $this->dataObj->getLogMessagePrefix();
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e318da22af4f58becadae6d155a505a32835348
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Katie Horn <[email protected]>

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

Reply via email to