summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/pdo_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/pdo/pdo_driver.php')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index b8724e974..c3eb7cccd 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -129,21 +129,20 @@ class CI_DB_pdo_driver extends CI_DB {
$this->dsn = $this->subdriver.':';
// Add hostname to the DSN for databases that need it
- if ( ! empty($this->hostname) && strpos($this->hostname, ':') === FALSE
- && in_array($this->subdriver, array('informix', 'cubrid')))
+ if ( ! empty($this->hostname) && strpos($this->hostname, ':') === FALSE && $this->subdriver === 'informix')
{
$this->dsn .= 'host='.$this->hostname.';';
}
// Add a port to the DSN for databases that can use it
- if ( ! empty($this->port) && in_array($this->subdriver, array('informix', 'ibm', 'cubrid')))
+ if ( ! empty($this->port) && in_array($this->subdriver, array('informix', 'ibm'), TRUE))
{
$this->dsn .= 'port='.$this->port.';';
}
}
// Add the database name to the DSN, if needed
- if (stripos($this->dsn, 'dbname') === FALSE && in_array($this->subdriver, array('4D', 'cubrid')))
+ if (stripos($this->dsn, 'dbname') === FALSE && $this->subdriver === '4D')
{
$this->dsn .= 'dbname='.$this->database.';';
}