summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/oci8/oci8_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-07-26 20:03:12 +0200
committerAndrey Andreev <narf@devilix.net>2016-07-26 20:03:12 +0200
commit77266bc6a01668b2106b9974da02e2a7ceaf2fe6 (patch)
tree955346c3278c03a2ff4174b9d078e9416a298ee9 /system/database/drivers/oci8/oci8_driver.php
parenta9874a638970ef826f835718e58b197ff3672566 (diff)
parent0b9540209499fbd0515e13fdc66e85dea4b6baad (diff)
Merge branch '3.1-stable' into develop
Conflicts resolved: .travis.yml system/core/CodeIgniter.php system/database/drivers/oci8/oci8_forge.php system/database/drivers/pdo/subdrivers/pdo_oci_forge.php system/helpers/path_helper.php system/libraries/Email.php user_guide_src/source/changelog.rst user_guide_src/source/conf.py user_guide_src/source/contributing/index.rst user_guide_src/source/general/requirements.rst user_guide_src/source/general/styleguide.rst user_guide_src/source/installation/downloads.rst user_guide_src/source/installation/upgrade_310.rst user_guide_src/source/installation/upgrading.rst
Diffstat (limited to 'system/database/drivers/oci8/oci8_driver.php')
-rw-r--r--system/database/drivers/oci8/oci8_driver.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php
index 59f0e8456..df7e0848a 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.php
@@ -559,23 +559,29 @@ class CI_DB_oci8_driver extends CI_DB {
*/
public function error()
{
- /* oci_error() returns an array that already contains the
- * 'code' and 'message' keys, so we can just return it.
- */
+ // oci_error() returns an array that already contains
+ // 'code' and 'message' keys, but it can return false
+ // if there was no error ....
if (is_resource($this->curs_id))
{
- return oci_error($this->curs_id);
+ $error = oci_error($this->curs_id);
}
elseif (is_resource($this->stmt_id))
{
- return oci_error($this->stmt_id);
+ $error = oci_error($this->stmt_id);
}
elseif (is_resource($this->conn_id))
{
- return oci_error($this->conn_id);
+ $error = oci_error($this->conn_id);
+ }
+ else
+ {
+ $error = oci_error();
}
- return oci_error();
+ return is_array($error)
+ ? $error
+ : array('code' => '', 'message' => '');
}
// --------------------------------------------------------------------