summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2021-12-20 15:30:33 +0100
committerAndrey Andreev <narf@devilix.net>2021-12-20 15:30:33 +0100
commita003ba25a58b5ddeae04225195b0aab1a5c29062 (patch)
treeaa7e590e0cbf9c9d22545144846a8354a4d222f4 /system/database/drivers/postgre
parentbf867137771c18f263bfab54cce258c27b91d2e8 (diff)
PHP 8.1 update to postgre database driver
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php4
-rw-r--r--system/database/drivers/postgre/postgre_result.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 84717d8b5..eb11a556a 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -135,7 +135,7 @@ class CI_DB_postgre_driver extends CI_DB {
* Database connection
*
* @param bool $persistent
- * @return resource
+ * @return resource|object
*/
public function db_connect($persistent = FALSE)
{
@@ -226,7 +226,7 @@ class CI_DB_postgre_driver extends CI_DB {
* Execute the query
*
* @param string $sql an SQL query
- * @return resource
+ * @return resource|object
*/
protected function _execute($sql)
{
diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php
index a0a628f0a..d977a60e3 100644
--- a/system/database/drivers/postgre/postgre_result.php
+++ b/system/database/drivers/postgre/postgre_result.php
@@ -126,7 +126,7 @@ class CI_DB_postgre_result extends CI_DB_result {
*/
public function free_result()
{
- if (is_resource($this->result_id))
+ if ($this->result_id !== FALSE)
{
pg_free_result($this->result_id);
$this->result_id = FALSE;