Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398409 )

Change subject: Don't throw an exception when passed a bogus feed type
......................................................................

Don't throw an exception when passed a bogus feed type

Just assume they meant all, or something. They're already getting
the <Warning> in the response for a bogus value, no need to make
it act like there's some real error here we can't handle.

Bug: T24510
Change-Id: I92b059caea87e82f38bc5184b9c74b12d9abc421
---
M api/ApiFeedLQTThreads.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads 
refs/changes/09/398409/1

diff --git a/api/ApiFeedLQTThreads.php b/api/ApiFeedLQTThreads.php
index d29e4c3..6ad3db3 100644
--- a/api/ApiFeedLQTThreads.php
+++ b/api/ApiFeedLQTThreads.php
@@ -131,14 +131,13 @@
                // What's included?
                $types = (array)$params['type'];
 
+               $msg = 'lqt-feed-title-all';
                if ( !count( array_diff( [ 'replies', 'newthreads' ], $types ) 
) ) {
                        $msg = 'lqt-feed-title-all';
                } elseif ( in_array( 'replies', $types ) ) {
                        $msg = 'lqt-feed-title-replies';
                } elseif ( in_array( 'newthreads', $types ) ) {
                        $msg = 'lqt-feed-title-new-threads';
-               } else {
-                       throw new Exception( "Unable to determine appropriate 
display type" );
                }
 
                if ( $fromCount ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92b059caea87e82f38bc5184b9c74b12d9abc421
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

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

Reply via email to