diff --git a/CHANGELOG.md b/CHANGELOG.md index 73cf722bb..aaff869da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Yii Framework 2 mongodb extension Change Log 3.0.4 under development ----------------------- -- no changes in this release. +- Bug #388: Fix `MongoDB\Driver\Cursor::getId() expects exactly 0 arguments, 1 given` (vanyabrovary) 3.0.3 May 06, 2025 diff --git a/src/BatchQueryResult.php b/src/BatchQueryResult.php index acfbf415b..2281e3fc8 100644 --- a/src/BatchQueryResult.php +++ b/src/BatchQueryResult.php @@ -129,7 +129,7 @@ protected function fetchData() if ($this->_iterator === null) { $this->query->addOptions(['batchSize' => $this->batchSize]); $cursor = $this->query->buildCursor($this->db); - $token = 'fetch cursor id = ' . $cursor->getId(true); + $token = 'fetch cursor id = ' . $cursor->getId(); Yii::info($token, __METHOD__); if ($cursor instanceof \Iterator) { diff --git a/src/Query.php b/src/Query.php index d8592566f..631f09e6e 100644 --- a/src/Query.php +++ b/src/Query.php @@ -212,7 +212,7 @@ public function buildCursor($db = null) */ protected function fetchRows($cursor, $all = true, $indexBy = null) { - $token = 'fetch cursor id = ' . $cursor->getId(true); + $token = 'fetch cursor id = ' . $cursor->getId(); Yii::info($token, __METHOD__); try { Yii::beginProfile($token, __METHOD__); diff --git a/src/file/Cursor.php b/src/file/Cursor.php index e543556b8..abaae212c 100644 --- a/src/file/Cursor.php +++ b/src/file/Cursor.php @@ -82,7 +82,7 @@ public function toArray() */ public function getId() { - return $this->getInnerIterator()->getId(true); + return $this->getInnerIterator()->getId(); } /**