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

@@ -1110,10 +1110,10 @@ function load_config($config_file) {
$success_apply_user_config = FALSE;
$old_error_reporting = error_reporting( 0 );
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 {
$success_apply_user_config =
eval( '?>' . implode( '\n', file( $config_file ) ) );
eval('?>' . trim(implode("\n", file($config_file))));
}
error_reporting( $old_error_reporting );
unset( $old_error_reporting );