Commit 45b5adda authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #45 from gnomii/master

Add a test when the port is empty
parents 0f3f8769 1efdcdbf
...@@ -37,7 +37,7 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -37,7 +37,7 @@ class Driver implements \Doctrine\DBAL\Driver
if (isset($params['host']) && $params['host'] != '') { if (isset($params['host']) && $params['host'] != '') {
$dsn .= 'host=' . $params['host'] . ' '; $dsn .= 'host=' . $params['host'] . ' ';
} }
if (isset($params['port'])) { if (isset($params['port']) && $params['port'] != '') {
$dsn .= 'port=' . $params['port'] . ' '; $dsn .= 'port=' . $params['port'] . ' ';
} }
if (isset($params['dbname'])) { if (isset($params['dbname'])) {
...@@ -67,4 +67,4 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -67,4 +67,4 @@ class Driver implements \Doctrine\DBAL\Driver
$params = $conn->getParams(); $params = $conn->getParams();
return $params['dbname']; return $params['dbname'];
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment