From: Platonides Date: Tue, 15 Nov 2011 16:35:52 +0000 (+0000) Subject: Fixup for r102997. If you add returns to a profiled function, X-Git-Tag: 1.31.0-rc.0~26489 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=72f648ae910b32a27d4af33ef06151310d9259a5;p=lhc%2Fweb%2Fwiklou.git Fixup for r102997. If you add returns to a profiled function, you should make sure to wfProfileOut on all branches. --- diff --git a/includes/Article.php b/includes/Article.php index 5fbfc3b776..3b22b86b74 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -289,18 +289,21 @@ class Article extends Page { $this->mRevision = Revision::newFromId( $oldid ); if ( !$this->mRevision ) { wfDebug( __METHOD__ . " failed to retrieve specified revision, id $oldid\n" ); + wfProfileOut( __METHOD__ ); return false; } } } else { if ( !$this->mPage->getLatest() ) { wfDebug( __METHOD__ . " failed to find page data for title " . $this->getTitle()->getPrefixedText() . "\n" ); + wfProfileOut( __METHOD__ ); return false; } $this->mRevision = $this->mPage->getRevision(); if ( !$this->mRevision ) { wfDebug( __METHOD__ . " failed to retrieve current page, rev_id " . $this->mPage->getLatest() . "\n" ); + wfProfileOut( __METHOD__ ); return false; } }