View | Details | Raw Unified | Return to bug 274971
Collapse All | Expand All

(-)b/databases/pear-DB/Makefile (+1 lines)
Lines 1-5 Link Here
1
PORTNAME=	DB
1
PORTNAME=	DB
2
PORTVERSION=	1.11.0
2
PORTVERSION=	1.11.0
3
PORTREVISION=	1
3
PORTEPOCH=	1
4
PORTEPOCH=	1
4
CATEGORIES=	databases www pear
5
CATEGORIES=	databases www pear
5
6
(-)b/databases/pear-DB/files/patch-DB_pgsql.php (+26 lines)
Added Link Here
1
--- DB/pgsql.php.orig	2021-08-11 00:23:52 UTC
2
+++ DB/pgsql.php
3
@@ -356,12 +356,12 @@ class DB_pgsql extends DB_common
4
         } elseif (preg_match('/^\s*\(*\s*(SELECT|EXPLAIN|FETCH|SHOW|WITH)\s/si',
5
                              $query))
6
         {
7
-            $this->row[(int)$result] = 0; // reset the row counter.
8
+            $this->row[pg_num_rows($result)] = 0; // reset the row counter.
9
             $numrows = $this->numRows($result);
10
             if (is_object($numrows)) {
11
                 return $numrows;
12
             }
13
-            $this->_num_rows[(int)$result] = $numrows;
14
+            $this->_num_rows[pg_num_rows($result)] = $numrows;
15
             $this->affected = 0;
16
             return $result;
17
         } else {
18
@@ -412,7 +412,7 @@ class DB_pgsql extends DB_common
19
      */
20
     function fetchInto($result, &$arr, $fetchmode, $rownum = null)
21
     {
22
-        $result_int = (int)$result;
23
+        $result_int = pg_num_rows($result);
24
         $rownum = ($rownum !== null) ? $rownum : $this->row[$result_int];
25
         if ($rownum >= $this->_num_rows[$result_int]) {
26
             return null;

Return to bug 274971