diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-02 14:45:41 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-02 14:45:41 +0100 |
commit | 4be5de1d11eefd9f0b7cf0589a2942f067cefe35 (patch) | |
tree | 6b360e221710377c2de0f3360e6c11a9ba1e9d6b /system/database/drivers/oci8/oci8_driver.php | |
parent | bcb3bbb97c8c046f80009a2bd8dffb96795ed239 (diff) |
Replaced DB methods _error_message() and _error_number() with error() (issue #1097)
Diffstat (limited to 'system/database/drivers/oci8/oci8_driver.php')
-rw-r--r-- | system/database/drivers/oci8/oci8_driver.php | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 6da6dc724..97efb4647 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -527,39 +527,18 @@ class CI_DB_oci8_driver extends CI_DB { // -------------------------------------------------------------------- /** - * The error message string + * Error * - * @return string - */ - protected function _error_message() - { - $error = $this->_oci8_error_data(); - return $error['message']; - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @return string - */ - protected function _error_number() - { - $error = $this->_oci8_error_data(); - return $error['code']; - } - - // -------------------------------------------------------------------- - - /** - * OCI8-specific method to get errors. - * Used by _error_message() and _error_code(). + * Returns an array containing code and message of the last + * database error that has occured. * * @return array */ - protected function _oci8_error_data() + public function error() { + /* oci_error() returns an array that already contains the + * 'code' and 'message' keys, so we can just return it. + */ if (is_resource($this->curs_id)) { return oci_error($this->curs_id); |