jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344559 )

Change subject: Follow-up 4769299ef: only register conflicts with ORES filters 
if they exist
......................................................................


Follow-up 4769299ef: only register conflicts with ORES filters if they exist

This caused a fatal error if the user had ORES disabled, or if one
of the models was disabled in the config.

Bug: T161225
Change-Id: I92dd8734999073362583d14276224af4506d5d08
(cherry-picked from commit 5a8cd6d714417f4d8742601bd149ff6872180fb5)
---
M client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
1 file changed, 16 insertions(+), 12 deletions(-)

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



diff --git a/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php 
b/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
index 2e0f963..b1f525e 100644
--- a/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
+++ b/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
@@ -233,20 +233,24 @@
 
                if ( $extensionRegistry->isLoaded( 'ORES' ) ) {
                        $damagingGroup = $specialPage->getFilterGroup( 
'damaging' );
-                       $wikidataFilter->conflictsWith(
-                               $damagingGroup,
-                               
'wikibase-rcfilters-hide-wikibase-conflicts-ores-global',
-                               
'wikibase-rcfilters-hide-wikibase-conflicts-ores',
-                               
'wikibase-rcfilters-damaging-conflicts-hide-wikibase'
-                       );
+                       if ( $damagingGroup ) {
+                               $wikidataFilter->conflictsWith(
+                                       $damagingGroup,
+                                       
'wikibase-rcfilters-hide-wikibase-conflicts-ores-global',
+                                       
'wikibase-rcfilters-hide-wikibase-conflicts-ores',
+                                       
'wikibase-rcfilters-damaging-conflicts-hide-wikibase'
+                               );
+                       }
 
                        $goodfaithGroup = $specialPage->getFilterGroup( 
'goodfaith' );
-                       $wikidataFilter->conflictsWith(
-                               $goodfaithGroup,
-                               
'wikibase-rcfilters-hide-wikibase-conflicts-ores-global',
-                               
'wikibase-rcfilters-hide-wikibase-conflicts-ores',
-                               
'wikibase-rcfilters-goodfaith-conflicts-hide-wikibase'
-                       );
+                       if ( $goodfaithGroup ) {
+                               $wikidataFilter->conflictsWith(
+                                       $goodfaithGroup,
+                                       
'wikibase-rcfilters-hide-wikibase-conflicts-ores-global',
+                                       
'wikibase-rcfilters-hide-wikibase-conflicts-ores',
+                                       
'wikibase-rcfilters-goodfaith-conflicts-hide-wikibase'
+                               );
+                       }
                }
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I92dd8734999073362583d14276224af4506d5d08
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.29.0-wmf.17
Gerrit-Owner: Catrope <r...@wikimedia.org>
Gerrit-Reviewer: Catrope <r...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to