Fix config loading (bug #1449821).

This commit is contained in:
Michal Čihař
2006-03-14 21:17:10 +00:00
parent bdbd73d351
commit ab2a1160b7
2 changed files with 3 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ $Source$
2006-03-14 Michal Čihař <michal@cihar.com> 2006-03-14 Michal Čihař <michal@cihar.com>
* lang/czech: Update, use binary prefixes. * lang/czech: Update, use binary prefixes.
* lang/english: Nothing to translate here. * lang/english: Nothing to translate here.
* scripts/setup.php: Fix config loading (bug #1449821).
2006-03-14 Alexander M. Turek <me@derrabus.de> 2006-03-14 Alexander M. Turek <me@derrabus.de>
* lang/german-*.inc.php: Use correct binary prefixes for byte units. * lang/german-*.inc.php: Use correct binary prefixes for byte units.

View File

@@ -1110,10 +1110,10 @@ function load_config($config_file) {
$success_apply_user_config = FALSE; $success_apply_user_config = FALSE;
$old_error_reporting = error_reporting( 0 ); $old_error_reporting = error_reporting( 0 );
if ( function_exists( 'file_get_contents' ) ) { if ( function_exists( 'file_get_contents' ) ) {
$success_apply_user_config = eval( '?>' . file_get_contents( $config_file ) ); $success_apply_user_config = eval('?>' . trim(file_get_contents($config_file)));
} else { } else {
$success_apply_user_config = $success_apply_user_config =
eval( '?>' . implode( '\n', file( $config_file ) ) ); eval('?>' . trim(implode("\n", file($config_file))));
} }
error_reporting( $old_error_reporting ); error_reporting( $old_error_reporting );
unset( $old_error_reporting ); unset( $old_error_reporting );