From: Brad Jorsch Date: Wed, 18 Jul 2018 15:14:56 +0000 (-0400) Subject: WikiPage: Return false from hasDifferencesOutsideMainSlot if no differences at all X-Git-Tag: 1.34.0-rc.0~4721^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=6e05c20c5c7581df7788f261e82792d27c7e9047;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 !== [] ); } /**