diff options
author | Andrey Andreev <narf@devilix.net> | 2015-12-14 15:22:33 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-12-14 15:22:33 +0100 |
commit | bc05b84995d5425d6bdc28c43174e70b720840ce (patch) | |
tree | 24c9170c249a575c66a68252af078287bac5c3a0 /system/database/drivers/oci8 | |
parent | 27ba5e6957c9e245478285191b5a88df4bcdc5bb (diff) |
Fix version() for Oracle DB drivers
Diffstat (limited to 'system/database/drivers/oci8')
-rw-r--r-- | system/database/drivers/oci8/oci8_driver.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 916ddeb90..206924d06 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -252,12 +252,16 @@ class CI_DB_oci8_driver extends CI_DB { return $this->data_cache['version']; } - if ( ! $this->conn_id OR ($version = oci_server_version($this->conn_id)) === FALSE) + if ( ! $this->conn_id OR ($version_string = oci_server_version($this->conn_id)) === FALSE) { return FALSE; } + elseif (preg_match('#Release\s(\d+(?:\.\d+)+)#', $version_string, $match)) + { + return $this->data_cache['version'] = $match[1]; + } - return $this->data_cache['version'] = $version; + return FALSE; } // -------------------------------------------------------------------- |