MaxSem has uploaded a new change for review.

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

Change subject: Fix undefined index warnings in prod
......................................................................

Fix undefined index warnings in prod

Bug: T131283
Change-Id: I61f46ebc326c047eb9615ca5d01b55098de79c29
---
M includes/ElasticsearchIntermediary.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/includes/ElasticsearchIntermediary.php 
b/includes/ElasticsearchIntermediary.php
index 902897e..5af76e4 100644
--- a/includes/ElasticsearchIntermediary.php
+++ b/includes/ElasticsearchIntermediary.php
@@ -676,6 +676,13 @@
                                $params['hitsOffset'] = intval( $offset );
                                $params['hits'] = array();
                                foreach ( $resultData['hits']['hits'] as $hit ) 
{
+                                       // @fixme: temporary plug
+                                       if ( !isset( 
$hit['_source']['namespace'] )
+                                               || !isset( 
$hit['_source']['title'] )
+                                       ) {
+                                               wfDebugLog( 'AdHocDebug', 
'Unexpected search hit: ' . print_r( $hit, true ) );
+                                               continue;
+                                       }
                                        // duplication of work ... this happens 
in the transformation
                                        // stage but we can't see that 
here...Perhaps we instead attach
                                        // this data at a later stage like 
CompletionSuggester?

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61f46ebc326c047eb9615ca5d01b55098de79c29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.27.0-wmf.19
Gerrit-Owner: MaxSem <[email protected]>

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

Reply via email to