Merge "EditPage::getBaseRevision can return null. (fix phpdoc)"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 15 Feb 2018 11:03:16 +0000 (11:03 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 15 Feb 2018 11:03:16 +0000 (11:03 +0000)
1  2 
includes/EditPage.php

diff --combined includes/EditPage.php
@@@ -325,7 -325,7 +325,7 @@@ class EditPage 
        /** @var bool Has a summary been preset using GET parameter &summary= ? */
        public $hasPresetSummary = false;
  
-       /** @var Revision|bool */
+       /** @var Revision|bool|null */
        public $mBaseRevision = false;
  
        /** @var bool */
@@@ -2369,7 -2369,7 +2369,7 @@@ ERROR
        /**
         * @note: this method is very poorly named. If the user opened the form with ?oldid=X,
         *        one might think of X as the "base revision", which is NOT what this returns.
-        * @return Revision Current version when the edit was started
+        * @return Revision|null Current version when the edit was started
         */
        public function getBaseRevision() {
                if ( !$this->mBaseRevision ) {
                        $this->mTitle, $pstContent, $user );
                $parserOutput = $pstContent->getParserOutput( $this->mTitle, null, $parserOptions );
                ScopedCallback::consume( $scopedCallback );
 -              $parserOutput->setEditSectionTokens( false ); // no section edit links
                return [
                        'parserOutput' => $parserOutput,
                        'html' => $parserOutput->getText( [