Fixup for r102997. If you add returns to a profiled function,
authorPlatonides <platonides@users.mediawiki.org>
Tue, 15 Nov 2011 16:35:52 +0000 (16:35 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 15 Nov 2011 16:35:52 +0000 (16:35 +0000)
you should make sure to wfProfileOut on all branches.

includes/Article.php

index 5fbfc3b..3b22b86 100644 (file)
@@ -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;
                        }
                }