From 6e05c20c5c7581df7788f261e82792d27c7e9047 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 18 Jul 2018 11:14:56 -0400 Subject: [PATCH] WikiPage: Return false from hasDifferencesOutsideMainSlot if no differences at all If the page has no differences in any slot, the method is incorrectly returning "true" to claim there are differences in some non-main slot. Follows up Ifdf9bc9d884844f9ffeb8019d9b13d5737862063. Bug: T194412 Change-Id: I013bcd9c39d05d9af47c1a29026b14d27af2db15 --- includes/page/WikiPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 7cc25bd3fc..424f6b7d90 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1470,7 +1470,7 @@ class WikiPage implements Page, IDBAccessObject { $bSlots = $b->getRevisionRecord()->getSlots(); $changedRoles = $aSlots->getRolesWithDifferentContent( $bSlots ); - return ( $changedRoles !== [ 'main' ] ); + return ( $changedRoles !== [ 'main' ] && $changedRoles !== [] ); } /** -- 2.20.1