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

Change subject: Fix undefined variable
......................................................................


Fix undefined variable

Change-Id: Ie51ad6eaa78c19497f0c18e061064dfa52cb2025
---
M includes/ElasticsearchIntermediary.php
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Manybubbles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/ElasticsearchIntermediary.php 
b/includes/ElasticsearchIntermediary.php
index 32943a5..4ab84df 100644
--- a/includes/ElasticsearchIntermediary.php
+++ b/includes/ElasticsearchIntermediary.php
@@ -90,14 +90,15 @@
         * @return \Status representing a backend failure
         */
        public function failure( $exception ) {
-               $this->finishRequest();
+               $took = $this->finishRequest();
                wfLogWarning( "Search backend error during $this->description 
after $took.  " .
-                       'Error message is:  ' . $e->getMessage() );
+                       'Error message is:  ' . $exception->getMessage() );
                return Status::newFatal( 'cirrussearch-backend-error' );
        }
 
        /**
         * Log the completion of a request to Elasticsearch.
+        * @return int number of milliseconds it took to complete the request
         */
        private function finishRequest() {
                if ( !$this->requestStart ) {
@@ -129,5 +130,6 @@
                        wfDebugLog( 'CirrusSearchSlowRequests', $logMessage );
                }
                $this->requestStart = null;
+               return $took;
        }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie51ad6eaa78c19497f0c18e061064dfa52cb2025
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to