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

Change subject: wfProfile fixes:  0543c7b0 added a wfProfileIn() that should 
have been wfProfileOut()  Reorder Http::request() so that wfProfileOut() is at 
the same level as the above wfProfileIn() [checked by check-vars]
......................................................................


wfProfile fixes:
 0543c7b0 added a wfProfileIn() that should have been wfProfileOut()
 Reorder Http::request() so that wfProfileOut() is at the same
level as the above wfProfileIn() [checked by check-vars]

Change-Id: Ia91445d792e524b9c570890397f1513af0d8cd73
---
M includes/HttpFunctions.php
1 file changed, 4 insertions(+), 6 deletions(-)

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



diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php
index 98d36d3..9e280db 100644
--- a/includes/HttpFunctions.php
+++ b/includes/HttpFunctions.php
@@ -69,14 +69,12 @@
                $req = MWHttpRequest::factory( $url, $options );
                $status = $req->execute();
 
+               $content = false;
                if ( $status->isOK() ) {
                        $content = $req->getContent();
-                       wfProfileOut( __METHOD__ . "-$method" );
-                       return $content;
-               } else {
-                       wfProfileOut( __METHOD__ . "-$method" );
-                       return false;
                }
+               wfProfileOut( __METHOD__ . "-$method" );
+               return $content;
        }
 
        /**
@@ -629,7 +627,7 @@
                        }
                }
 
-               wfProfileIn( __METHOD__ );
+               wfProfileOut( __METHOD__ );
        }
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia91445d792e524b9c570890397f1513af0d8cd73
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Platonides <platoni...@gmail.com>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
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