From: Platonides Date: Mon, 28 May 2012 17:37:35 +0000 (+0200) Subject: Change if/else to a ternary operator X-Git-Tag: 1.31.0-rc.0~23469^2 X-Git-Url: http://git.cyclocoop.org//%22%22.url_de_base%28%29.%22/%22?a=commitdiff_plain;h=74fa4635cab8c99a069b395a273529af43abc8c1;p=lhc%2Fweb%2Fwiklou.git Change if/else to a ternary operator This keep the wfProfileOut() detector happy. Change-Id: I85ecc33121d94e6a2d2e8ea3d1f5ca47f3db86bc --- diff --git a/includes/WikiPage.php b/includes/WikiPage.php index fffd5f644e..b5318c0a1a 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -530,11 +530,7 @@ class WikiPage extends Page { } wfProfileOut( __METHOD__ ); - if ( $row ) { - return Revision::newFromRow( $row ); - } else { - return null; - } + return $row ? Revision::newFromRow( $row ) : null; } /**