8000 fix issue in result iteratornow that total_count is not been initialized · thecodingmachine/tdbm@206aabc · GitHub
[go: up one dir, main page]

Skip to content

Commit 206aabc

Browse files
committed
fix issue in result iteratornow that total_count is not been initialized
1 parent bd4a1d8 commit 206aabc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ResultIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public function getIterator()
184184
*/
185185
public function take($offset, $limit)
186186
{
187-
if ($this->totalCount === 0) {
187+
if ($this instanceof EmptyResultIterator) {
188188
return PageIterator::createEmpyIterator($this);
189189
}
190190
return PageIterator::createResultIterator($this, $this->queryFactory->getMagicSql(), $this->parameters, $limit, $offset, $this->queryFactory->getColumnDescriptors(), $this->objectStorage, $this->className, $this->tdbmService, $this->magicQuery, $this->mode, $this->logger);

0 commit comments

Comments
 (0)
0