summaryrefslogtreecommitdiffstats
path: root/system/database/drivers
diff options
context:
space:
mode:
authorEric Barnes <eric@ericlbarnes.com>2011-12-15 21:48:07 +0100
committerEric Barnes <eric@ericlbarnes.com>2011-12-15 21:48:07 +0100
commitc10144c1d2a53c4662d3de911fdd3989b389b163 (patch)
tree7ce973463f811dc01b90a736f4172a0ff2a1b0f6 /system/database/drivers
parent399cca920b3d2d94e3c0f8d1099b22b6482481da (diff)
parent59dbcda901f45c5183e976a0a2da7c7459294d05 (diff)
Merge pull request #752 from toopay/pdo_sqlite
Fix for PDO driver, exception for sqlite in DSN spec
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 18a508b15..457cf714a 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -90,7 +90,10 @@ class CI_DB_pdo_driver extends CI_DB {
$this->_like_escape_chr = '!';
}
- $this->hostname .= ";dbname=".$this->database;
+ if (strpos($this->hostname, 'sqlite') === FALSE)
+ {
+ $this->hostname .= ";dbname=".$this->database;
+ }
$this->trans_enabled = FALSE;