summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/oci8/oci8_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/oci8/oci8_driver.php')
-rw-r--r--system/database/drivers/oci8/oci8_driver.php22
1 files changed, 5 insertions, 17 deletions
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php
index f309a8272..7453db7a8 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.php
@@ -208,27 +208,15 @@ class CI_DB_oci8_driver extends CI_DB {
/**
* Non-persistent database connection
*
+ * @param bool $persistent
* @return resource
*/
- public function db_connect()
- {
- return ( ! empty($this->char_set))
- ? @oci_connect($this->username, $this->password, $this->dsn, $this->char_set)
- : @oci_connect($this->username, $this->password, $this->dsn);
- }
-
- // --------------------------------------------------------------------
-
- /**
- * Persistent database connection
- *
- * @return resource
- */
- public function db_pconnect()
+ public function db_connect($persistent = FALSE)
{
+ $func = ($persistent === TRUE) ? 'oci_pconnect' : 'oci_connect';
return empty($this->char_set)
- ? @oci_pconnect($this->username, $this->password, $this->dsn)
- : @oci_pconnect($this->username, $this->password, $this->dsn, $this->char_set);
+ ? $func($this->username, $this->password, $this->dsn)
+ : $func($this->username, $this->password, $this->dsn, $this->char_set);
}
// --------------------------------------------------------------------