From 5f62872f13d86552e7df4d591816ac7c74a5a8a0 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 17 Sep 2011 19:09:13 +0000 Subject: [PATCH] Don't use isset() to check for null --- includes/WikiMap.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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 ); } /** -- 2.20.1