Skip to content

Commit 8f53e48

Browse files
authored
Fix #388: Fix MongoDB\Driver\Cursor::getId() expects exactly 0 arguments, 1 given
1 parent b1f551f commit 8f53e48

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Yii Framework 2 mongodb extension Change Log
44
3.0.4 under development
55
-----------------------
66

7-
- no changes in this release.
7+
- Bug #388: Fix `MongoDB\Driver\Cursor::getId() expects exactly 0 arguments, 1 given` (vanyabrovary)
88

99

1010
3.0.3 May 06, 2025

src/BatchQueryResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function fetchData()
129129
if ($this->_iterator === null) {
130130
$this->query->addOptions(['batchSize' => $this->batchSize]);
131131
$cursor = $this->query->buildCursor($this->db);
132-
$token = 'fetch cursor id = ' . $cursor->getId(true);
132+
$token = 'fetch cursor id = ' . $cursor->getId();
133133
Yii::info($token, __METHOD__);
134134

135135
if ($cursor instanceof \Iterator) {

src/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function buildCursor($db = null)
212212
*/
213213
protected function fetchRows($cursor, $all = true, $indexBy = null)
214214
{
215-
$token = 'fetch cursor id = ' . $cursor->getId(true);
215+
$token = 'fetch cursor id = ' . $cursor->getId();
216216
Yii::info($token, __METHOD__);
217217
try {
218218
Yii::beginProfile($token, __METHOD__);

src/file/Cursor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function toArray()
8282
*/
8383
public function getId()
8484
{
85-
return $this->getInnerIterator()->getId(true);
85+
return $this->getInnerIterator()->getId();
8686
}
8787

8888
/**

0 commit comments

Comments
 (0)