Commit 7b22f397 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge pull request #65 from dteoh/patch-1

Fix bug with empty or null host connection parameter in Oracle DSN construction
parents 537de7ea 461d9afb
...@@ -50,7 +50,7 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -50,7 +50,7 @@ class Driver implements \Doctrine\DBAL\Driver
protected function _constructDsn(array $params) protected function _constructDsn(array $params)
{ {
$dsn = ''; $dsn = '';
if (isset($params['host'])) { if (isset($params['host']) && $params['host'] != '') {
$dsn .= '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)' . $dsn .= '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)' .
'(HOST=' . $params['host'] . ')'; '(HOST=' . $params['host'] . ')';
......
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