From: Alexandre Emsenhuber Date: Sat, 17 Sep 2011 19:09:13 +0000 (+0000) Subject: Don't use isset() to check for null X-Git-Tag: 1.31.0-rc.0~27586 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=5f62872f13d86552e7df4d591816ac7c74a5a8a0;p=lhc%2Fweb%2Fwiklou.git Don't use isset() to check for null --- diff --git a/includes/WikiMap.php b/includes/WikiMap.php index 458718ee8b..35587f26fe 100644 --- a/includes/WikiMap.php +++ b/includes/WikiMap.php @@ -17,15 +17,14 @@ class WikiMap { $wgConf->loadFullData(); list( $major, $minor ) = $wgConf->siteFromDB( $wikiID ); - if( isset( $major ) ) { - $server = $wgConf->get( 'wgCanonicalServer', $wikiID, $major, - array( 'lang' => $minor, 'site' => $major ) ); - $path = $wgConf->get( 'wgArticlePath', $wikiID, $major, - array( 'lang' => $minor, 'site' => $major ) ); - return new WikiReference( $major, $minor, $server, $path ); - } else { + if( $major === null ) { return null; } + $server = $wgConf->get( 'wgCanonicalServer', $wikiID, $major, + array( 'lang' => $minor, 'site' => $major ) ); + $path = $wgConf->get( 'wgArticlePath', $wikiID, $major, + array( 'lang' => $minor, 'site' => $major ) ); + return new WikiReference( $major, $minor, $server, $path ); } /**