summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/pdo_driver.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-02-10 14:37:45 +0100
committerTimothy Warren <tim@timshomepage.net>2012-02-10 14:37:45 +0100
commit1c175c8d9697d6e8163770c45643f97e557149e6 (patch)
tree9e0f76ead86c7547c19d1355e366af0c6ece6123 /system/database/drivers/pdo/pdo_driver.php
parent16af6afe991381360439135ddb0735dab1280fed (diff)
Fixed old-style pdo connection string
Diffstat (limited to 'system/database/drivers/pdo/pdo_driver.php')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index fc378daeb..5e5c01ef9 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -117,7 +117,11 @@ class CI_DB_pdo_driver extends CI_DB {
// $db['hostname'] = 'pdodriver:host(/Server(/DSN))=hostname(/DSN);';
// We need to get the prefix (pdodriver used by PDO).
$this->dsn = $this->hostname;
- $this->pdodriver = substr($this->hostname, 0, strpos($this->hostname, ':'));
+ $split_dsn = explode(":", $this->hostname);
+ $this->pdodriver = $split_dsn[0];
+
+ // End this part of the dsn with a semicolon
+ $this->dsn .= rtrim(';', $this->dsn) . ';';
}
else
{