From cebf04f33435eed4b042df3eb35bce0a7f7e219f Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 19 Mar 2013 16:12:14 +0100 Subject: [PATCH] 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 --- includes/HttpFunctions.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 98d36d384f..9e280dbba8 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -69,14 +69,12 @@ class Http { $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 @@ class MWHttpRequest { } } - wfProfileIn( __METHOD__ ); + wfProfileOut( __METHOD__ ); } /** -- 2.20.1