jenkins-bot has submitted this change and it was merged.

Change subject: Use -1 as index version if the version field is missing
......................................................................


Use -1 as index version if the version field is missing

Change-Id: Idf1f1ca99181d583299ae9457d4fb1c11f1e825d
---
M includes/Sanity/Checker.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Sanity/Checker.php b/includes/Sanity/Checker.php
index 94bbe59..32fc48a 100644
--- a/includes/Sanity/Checker.php
+++ b/includes/Sanity/Checker.php
@@ -264,7 +264,7 @@
                $latest = $page->getLatest();
                $foundInsanityInIndex = false;
                foreach ( $fromIndex as $indexInfo ) {
-                       $version = $indexInfo->getSource()['version'];
+                       $version = isset( $indexInfo->getSource()['version'] ) 
? $indexInfo->getSource()['version'] : -1;
                        if ( $version < $latest ) {
                                $type = $this->connection->extractIndexSuffix( 
$indexInfo->getIndex() );
                                $this->remediator->oldVersionInIndex( $docId, 
$page, $type );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf1f1ca99181d583299ae9457d4fb1c11f1e825d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse <dcau...@wikimedia.org>
Gerrit-Reviewer: Cindy-the-browser-test-bot <bernhardsone...@gmail.com>
Gerrit-Reviewer: EBernhardson <ebernhard...@wikimedia.org>
Gerrit-Reviewer: Gehel <gleder...@wikimedia.org>
Gerrit-Reviewer: Manybubbles <never...@wikimedia.org>
Gerrit-Reviewer: Smalyshev <smalys...@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