From: Derick Alangi Date: Sun, 24 Mar 2019 23:55:42 +0000 (+0100) Subject: diff: Wrap condition around brackets for more readability X-Git-Tag: 1.34.0-rc.0~1949^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=7f5a204e427a42c8ea48ae4a74cafd1e517dc245;ds=sidebyside diff: Wrap condition around brackets for more readability Also, as I'm touching this line, fixing the is_null() check to finally clean this entire line up once and for all. Change-Id: I573972519796f3eedaf950fa953b9df6b6824379 --- diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 833bc6950d..1ab1246ba0 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -1733,16 +1733,16 @@ class DifferenceEngine extends ContextSource { * by the request context); if oldid is 0, then compare the revision in newid to the * immediately previous one. * - * If oldid is false, leave the corresponding revision object set - * to false. This can happen with 'diff=prev' pointing to a non-existent revision, - * and is also used directly by the API. + * If oldid is false, leave the corresponding revision object set to false. This can + * happen with 'diff=prev' pointing to a non-existent revision, and is also used directly + * by the API. * * @return bool Whether both revisions were loaded successfully. Setting mOldRev * to false counts as successful loading. */ public function loadRevisionData() { if ( $this->mRevisionsLoaded ) { - return $this->isContentOverridden || $this->mNewRev && !is_null( $this->mOldRev ); + return $this->isContentOverridden || ( $this->mOldRev !== null && $this->mNewRev !== null ); } // Whether it succeeds or fails, we don't want to try again