diff options
Diffstat (limited to 'system/database/drivers')
-rw-r--r-- | system/database/drivers/mysql/mysql_driver.php | 4 | ||||
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 2 | ||||
-rw-r--r-- | system/database/drivers/oci8/oci8_driver.php | 4 | ||||
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 4 | ||||
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 4 | ||||
-rw-r--r-- | system/database/drivers/sqlite/sqlite_driver.php | 12 |
6 files changed, 17 insertions, 13 deletions
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index be7c672f7..1afc2062b 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -45,7 +45,7 @@ class CI_DB_mysql_driver extends CI_DB { */ function db_connect() { - return mysql_connect($this->hostname, $this->username, $this->password, TRUE); + return @mysql_connect($this->hostname, $this->username, $this->password, TRUE); } // -------------------------------------------------------------------- @@ -58,7 +58,7 @@ class CI_DB_mysql_driver extends CI_DB { */ function db_pconnect() { - return mysql_pconnect($this->hostname, $this->username, $this->password); + return @mysql_pconnect($this->hostname, $this->username, $this->password); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 59420912f..3a0d3b562 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -47,7 +47,7 @@ class CI_DB_mysqli_driver extends CI_DB { */ function db_connect() { - return mysqli_connect($this->hostname, $this->username, $this->password); + return @mysqli_connect($this->hostname, $this->username, $this->password); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index c091edf64..551a670fe 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -62,7 +62,7 @@ class CI_DB_oci8_driver extends CI_DB { */ function db_connect() { - return ocilogon($this->username, $this->password, $this->hostname); + return @ocilogon($this->username, $this->password, $this->hostname); } // -------------------------------------------------------------------- @@ -75,7 +75,7 @@ class CI_DB_oci8_driver extends CI_DB { */ function db_pconnect() { - return ociplogon($this->username, $this->password, $this->hostname); + return @ociplogon($this->username, $this->password, $this->hostname); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 09ca07ee4..4d1fac2ed 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -38,7 +38,7 @@ class CI_DB_odbc_driver extends CI_DB { */ function db_connect() { - return odbc_connect($this->database, $this->username, $this->password); + return @odbc_connect($this->database, $this->username, $this->password); } // -------------------------------------------------------------------- @@ -51,7 +51,7 @@ class CI_DB_odbc_driver extends CI_DB { */ function db_pconnect() { - return odbc_pconnect($this->database, $this->username, $this->password); + return @odbc_pconnect($this->database, $this->username, $this->password); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 81aaafe14..68fde01b1 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -40,7 +40,7 @@ class CI_DB_postgre_driver extends CI_DB { { $port = ($this->port == '') ? '' : " port=".$this->port; - return pg_connect("host=".$this->hostname.$port." dbname=".$this->database." user=".$this->username." password=".$this->password); + return @pg_connect("host=".$this->hostname.$port." dbname=".$this->database." user=".$this->username." password=".$this->password); } // -------------------------------------------------------------------- @@ -55,7 +55,7 @@ class CI_DB_postgre_driver extends CI_DB { { $port = ($this->port == '') ? '' : " port=".$this->port; - return pg_pconnect("host=".$this->hostname.$port." dbname=".$this->database." user=".$this->username." password=".$this->password); + return @pg_pconnect("host=".$this->hostname.$port." dbname=".$this->database." user=".$this->username." password=".$this->password); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index ce3c57935..3f71b3536 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -40,14 +40,16 @@ class CI_DB_sqlite_driver extends CI_DB { */ function db_connect() { - if ( ! $conn_id = sqlite_open($this->database, 0666, $error)) + if ( ! $conn_id = @sqlite_open($this->database, 0666, $error)) { log_message('error', $error); if ($this->db_debug) { $this->display_error($error, '', TRUE); - } + } + + return FALSE; } return $conn_id; @@ -63,14 +65,16 @@ class CI_DB_sqlite_driver extends CI_DB { */ function db_pconnect() { - if ( ! $conn_id = sqlite_popen($this->database, 0666, $error)) + if ( ! $conn_id = @sqlite_popen($this->database, 0666, $error)) { log_message('error', $error); if ($this->db_debug) { $this->display_error($error, '', TRUE); - } + } + + return FALSE; } return $conn_id; |