Skip to content

Commit ba53a0a

Browse files
committed
SQLCountWithArray - ArrayToString conversion: add type to fetchColumn call
1 parent 83b62e9 commit ba53a0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/InnerResultIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ public function count()
124124

125125
/**
126126
* Makes a separate SQL query to compute the row count.
127-
* (not needed in MySQL)
127+
* (not needed in MySQL if fetch is already done)
128128
*/
129129
private function getRowCountViaSqlQuery(): int
130130
{
131131
$countSql = 'SELECT COUNT(1) FROM ('.$this->getQuery().') c';
132132

133133
$this->logger->debug('Running count SQL request: '.$countSql);
134134

135-
$this->count = (int) $this->tdbmService->getConnection()->fetchColumn($countSql, $this->parameters);
135+
$this->count = (int) $this->tdbmService->getConnection()->fetchColumn($countSql, $this->parameters, 0, DbalUtils::generateArrayTypes($this->parameters));
136136
return $this->count;
137137
}
138138

0 commit comments

Comments
 (0)