From: Fomafix Date: Fri, 8 Feb 2019 13:05:13 +0000 (+0100) Subject: Remove double check of $oldRevision X-Git-Tag: 1.34.0-rc.0~2812^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices//%22http:/commons.wikimedia.org/wiki/Commons:Firefogg/%22?a=commitdiff_plain;h=04370ccb0825ecff8065a4e9037abeedb317a35f;p=lhc%2Fweb%2Fwiklou.git Remove double check of $oldRevision The if ( $oldRevision ) above already do the same check. Change-Id: Ibbd5b6209d67f195b6b7431bccc31c4401f0a799 --- diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 40521d5a6f..43bc6e470c 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -1642,8 +1642,8 @@ class DifferenceEngine extends ContextSource { $this->mOldPage = Title::newFromLinkTarget( $oldRevision->getPageAsLinkTarget() ); // This method is meant for edit diffs and such so there is no reason to provide a // revision that's not readable to the user, but check it just in case. - $this->mOldContent = $oldRevision ? $oldRevision->getContent( SlotRecord::MAIN, - RevisionRecord::FOR_THIS_USER, $this->getUser() ) : null; + $this->mOldContent = $oldRevision->getContent( SlotRecord::MAIN, + RevisionRecord::FOR_THIS_USER, $this->getUser() ); } else { $this->mOldPage = null; $this->mOldRev = $this->mOldid = false;