summaryrefslogtreecommitdiff
path: root/drivers/adodb-postgres7.inc.php
diff options
context:
space:
mode:
authorReimuHakurei <alex@alexingram.net>2022-05-06 04:41:03 -0500
committerDamien Regad <dregad@mantisbt.org>2022-05-06 13:52:02 +0200
commitb8661ea2678995ec7a0efeb05e1dadcc957194fd (patch)
tree18a067fd5da31b0fda380723d05b23708f987f57 /drivers/adodb-postgres7.inc.php
parente5b1ee305a7ebc1a93d9993a708d2ad9e4df65c3 (diff)
downloadadodb-b8661ea2678995ec7a0efeb05e1dadcc957194fd.tar.gz
adodb-b8661ea2678995ec7a0efeb05e1dadcc957194fd.tar.bz2
adodb-b8661ea2678995ec7a0efeb05e1dadcc957194fd.zip
pgsql: remove is_resource() checks (PHP 8.1 compat)
Affected_Rows() always returns false on PHP 8.1, because the 'pgsql result' resource has been replaced by the PgSql\Result class [1]. Changes to original contribution: * Adjust PHPDoc for ADODB_postgres64::$_resultid * Fix one more occurrence in the postgres7 driver Fixes #833 [1]: https://www.php.net/manual/en/class.pgsql-result.php Co-authored-by: Damien Regad <dregad@mantisbt.org> (cherry picked from commit e3287d6be5545634a6ccbf868919028991a68791)
Diffstat (limited to 'drivers/adodb-postgres7.inc.php')
-rw-r--r--drivers/adodb-postgres7.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/adodb-postgres7.inc.php b/drivers/adodb-postgres7.inc.php
index ddbe7a6e..b5e63acf 100644
--- a/drivers/adodb-postgres7.inc.php
+++ b/drivers/adodb-postgres7.inc.php
@@ -231,7 +231,7 @@ class ADODB_postgres7 extends ADODB_postgres64 {
}
// check if no data returned, then no need to create real recordset
if ($rez && pg_num_fields($rez) <= 0) {
- if (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') {
+ if ($this->_resultid !== false) {
pg_free_result($this->_resultid);
}
$this->_resultid = $rez;