Ladsgroup has uploaded a new change for review.

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

Change subject: Fix internal error when score doesn't exist in the table in 
SpecialContribs
......................................................................

Fix internal error when score doesn't exist in the table in SpecialContribs

Bug: T142858
Change-Id: I9e4cb856750dd546cce278cf159365d826f4b8ec
---
M includes/Hooks.php
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/98/304498/1

diff --git a/includes/Hooks.php b/includes/Hooks.php
index 94b05c1..b900417 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -286,6 +286,11 @@
                        return true;
                }
 
+               // Doesn't have ores score, skipping.
+               if ( !isset( $row->oresc_probability ) ) {
+                       return true;
+               }
+
                if ( $row->oresc_probability > $row->ores_threshold ) {
                        // Prepend the "r" flag
                        array_unshift( $flags, ChangesList::flag( 'damaging' ) 
);
@@ -299,6 +304,11 @@
                        return true;
                }
 
+               // Doesn't have ores score, skipping.
+               if ( !isset( $row->oresc_probability ) ) {
+                       return true;
+               }
+
                if ( $row->oresc_probability > $row->ores_threshold ) {
                        // Add the damaging class
                        $classes[] = 'damaging';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e4cb856750dd546cce278cf159365d826f4b8ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>

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

Reply via email to