DCausse has uploaded a new change for review.

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

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/01/311401/1

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: newchange
Gerrit-Change-Id: Idf1f1ca99181d583299ae9457d4fb1c11f1e825d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse <dcau...@wikimedia.org>

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

Reply via email to