summaryrefslogtreecommitdiffstats
path: root/system/database/drivers
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-02-13 20:12:35 +0100
committerTimothy Warren <tim@timshomepage.net>2012-02-13 20:12:35 +0100
commit25dc75595dd3550a6c20f3d34d8f5259465b545f (patch)
tree630885e8373a25414fefe3d924aa764f0a076779 /system/database/drivers
parent928d83ce1590f14aadfa7a1805c00bb84bd9ef1c (diff)
Re-added if ! empty clause
Diffstat (limited to 'system/database/drivers')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index c5940ddc8..8516cc6fe 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -121,7 +121,10 @@ class CI_DB_pdo_driver extends CI_DB {
// End dsn with a semicolon for extra backward compability
// if database property was not empty.
- $this->dsn .= rtrim($this->hostname, ';').';';
+ if( ! empty($this->database))
+ {
+ $this->dsn .= rtrim($this->hostname, ';').';';
+ }
}
else
{