Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove superflous if in catch #904

Merged
merged 1 commit into from Feb 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 9 additions & 12 deletions ConnectionFactory.php
Expand Up @@ -82,18 +82,15 @@ private function getDatabasePlatform(Connection $connection)
{
try {
return $connection->getDatabasePlatform();
} catch (DBALException $driverException) {
if ($driverException instanceof DriverException) {
throw new DBALException(
'An exception occured while establishing a connection to figure out your platform version.' . PHP_EOL .
"You can circumvent this by setting a 'server_version' configuration value" . PHP_EOL . PHP_EOL .
'For further information have a look at:' . PHP_EOL .
'https://github.com/doctrine/DoctrineBundle/issues/673',
0,
$driverException
);
}
throw $driverException;
} catch (DriverException $driverException) {
throw new DBALException(
'An exception occured while establishing a connection to figure out your platform version.' . PHP_EOL .
"You can circumvent this by setting a 'server_version' configuration value" . PHP_EOL . PHP_EOL .
'For further information have a look at:' . PHP_EOL .
'https://github.com/doctrine/DoctrineBundle/issues/673',
0,
$driverException
);
}
}

Expand Down