jenkins-bot has submitted this change and it was merged.

Change subject: Fail if the message body is missing
......................................................................


Fail if the message body is missing

Bug: T140515
Change-Id: I5ad32b9ec2272d1a991bc612c8b122abb87f8211
---
M sites/all/modules/wmf_common/Queue.php
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sites/all/modules/wmf_common/Queue.php 
b/sites/all/modules/wmf_common/Queue.php
index c9702c5..4d64ae2 100644
--- a/sites/all/modules/wmf_common/Queue.php
+++ b/sites/all/modules/wmf_common/Queue.php
@@ -445,6 +445,10 @@
     }
 
     protected function commonMessageNormalize( &$msg ) {
+        if ( !$msg->body ) {
+            throw new WmfException( 'INVALID_MESSAGE', 'Bad news, this message 
was lacking a body.' );
+        }
+
         // argh.  Collapse useful headers into the message, then do a stupid 
dance.
         $pull_headers = array(
             'source_name',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ad32b9ec2272d1a991bc612c8b122abb87f8211
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to