D3r1ck01 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/246458
Change subject: SpecialNewsletter $status variable can be undefined
......................................................................
SpecialNewsletter $status variable can be undefined
The $status variable holds the value "true" if a user
either subscribes or unsubscribes from wiki. When the $status->isGood()
method is called, if the status of $status is "true", then the action will
be display(either subscribed or unsubscribed). But if the value of $status
is "false", an exception is thrown, Error processing request.
Bug: T115312
Change-Id: I70a97aae2d509c4075e5345ff3146c28405fc7ab
---
M includes/specials/SpecialNewsletter.php
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter
refs/changes/58/246458/1
diff --git a/includes/specials/SpecialNewsletter.php
b/includes/specials/SpecialNewsletter.php
index 26a0fa4..b6cb6f2 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -329,6 +329,8 @@
// Add the success message if the action was successful
// Messages used: 'newsletter-subscribe-success',
'newsletter-unsubscribe-success'
$this->getOutput()->addWikiMsg(
"newsletter-$action-success", $this->newsletter->getName() );
+ } else {
+ throw new Exception( "Error Processing Request" , 1 );
}
return $status;
--
To view, visit https://gerrit.wikimedia.org/r/246458
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I70a97aae2d509c4075e5345ff3146c28405fc7ab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: D3r1ck01 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits