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

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

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



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/280494
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I61f46ebc326c047eb9615ca5d01b55098de79c29
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Cindy-the-browser-test-bot <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: Thcipriani <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to