[task/refactor-db-testcase] Do not show db password on connect error

PHPBB3-10043
This commit is contained in:
Igor Wiedler 2011-02-14 15:25:05 +01:00
parent 17b17bc939
commit d3718bf5d4

View file

@ -82,7 +82,8 @@ class phpbb_database_test_connection_manager
}
catch (PDOException $e)
{
throw new Exception("Unable do connect to $dsn with error: {$e->getMessage()}");
$cleaned_dsn = str_replace($this->config['dbpasswd'], '*password*', $dsn);
throw new Exception("Unable do connect to $cleaned_dsn with error: {$e->getMessage()}");
}
// good for debug