diff options
author | Daniel Paul Searles <daniel.paul.searles@gmail.com> | 2012-11-05 23:34:50 +0100 |
---|---|---|
committer | Daniel Paul Searles <daniel.paul.searles@gmail.com> | 2012-11-05 23:34:50 +0100 |
commit | 0e4069ba30922941917a26463cba250b0f14c8ef (patch) | |
tree | 76a7de06b6f8b07ab36ebaffe78235f22dffb1a2 /system/database/drivers/mysqli/mysqli_driver.php | |
parent | 3aca5695b2b8561986d11e20e6da46f9b32060f1 (diff) | |
parent | d743cdbe448258cc7f02abf15e8dc797dc6403eb (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_driver.php')
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 7d2507b40..ae17703ac 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -173,9 +173,16 @@ class CI_DB_mysqli_driver extends CI_DB { */ public function version() { - return isset($this->data_cache['version']) - ? $this->data_cache['version'] - : $this->data_cache['version'] = $this->conn_id->server_info; + if (isset($this->data_cache['version'])) + { + return $this->data_cache['version']; + } + elseif ( ! $this->conn_id) + { + $this->initialize(); + } + + return $this->data_cache['version'] = $this->conn_id->server_info; } // -------------------------------------------------------------------- |