diff options
author | Andrey Andreev <narf@devilix.net> | 2018-03-22 16:00:47 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2018-03-22 16:00:47 +0100 |
commit | c243df3af851fe90cd272f3958f7eb7bf76173b1 (patch) | |
tree | 83e8bda62fe6c5b40b7cd93cbc6c6c3a8214cc03 /system/database/drivers/postgre | |
parent | f3e19ac4990e1e3fbc6964e97e7e09e506935d6e (diff) | |
parent | 3d2073e877cb1fddbea8fcec5bc5d38b545cdcfa (diff) |
Merge branch '3.1-stable' into develop
Conflicts resolved:
system/core/CodeIgniter.php
system/core/Security.php
system/database/DB_query_builder.php
system/libraries/Email.php
user_guide_src/source/changelog.rst
user_guide_src/source/conf.py
user_guide_src/source/installation/downloads.rst
user_guide_src/source/installation/upgrading.rst
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index cae162e2e..e9b1e991c 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -218,8 +218,8 @@ class CI_DB_postgre_driver extends CI_DB { * and so we'll have to fall back to running a query in * order to get it. */ - return isset($pg_version['server']) - ? $this->data_cache['version'] = $pg_version['server'] + return (isset($pg_version['server']) && preg_match('#^(\d+\.\d+)#', $pg_version['server'], $match)) + ? $this->data_cache['version'] = $match[1] : parent::version(); } @@ -348,8 +348,7 @@ class CI_DB_postgre_driver extends CI_DB { */ public function insert_id() { - $v = pg_version($this->conn_id); - $v = isset($v['server']) ? $v['server'] : 0; // 'server' key is only available since PosgreSQL 7.4 + $v = $this->version(); $table = (func_num_args() > 0) ? func_get_arg(0) : NULL; $column = (func_num_args() > 1) ? func_get_arg(1) : NULL; |