From 3bb6246ab8701ef912e57dcc7a40ae2ea6a59e79 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sat, 11 Dec 2010 22:54:41 +0000 Subject: [PATCH] Remove that ugly unset( $vars['_lsExists'] ); Shouldn't the second file_exists() also need a wfSuppressWarnings? Follow up to r78118. --- includes/installer/Installer.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 766b4f4842..1338d0a03f 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -225,18 +225,17 @@ abstract class Installer { $_lsExists = file_exists( "$IP/LocalSettings.php" ); wfRestoreWarnings(); - if( $_lsExists ) { - require( "$IP/includes/DefaultSettings.php" ); - require( "$IP/LocalSettings.php" ); - if ( file_exists( "$IP/AdminSettings.php" ) ) { - require( "$IP/AdminSettings.php" ); - } - $vars = get_defined_vars(); - unset( $vars['_lsExists'] ); - return $vars; - } else { + if( !$_lsExists ) { return false; } + unset($_lsExists); + + require( "$IP/includes/DefaultSettings.php" ); + require( "$IP/LocalSettings.php" ); + if ( file_exists( "$IP/AdminSettings.php" ) ) { + require( "$IP/AdminSettings.php" ); + } + return get_defined_vars(); } /** -- 2.20.1