Skip to content

Commit dfe2aa5

Browse files
committed
fix bug
1 parent 2275449 commit dfe2aa5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Query.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,11 @@ public function buildCursor($db = null)
204204
/**
205205
* Fetches rows from the given Mongo cursor.
206206
* @param bool $all whether to fetch all rows or only first one.
207-
* @param string|callable $indexBy the column name or PHP callback,
208-
* by which the query results should be indexed by.
209207
* @param yii\mongodb\Connection $db the MongoDB connection used to fetch rows.
210208
* @throws Exception on failure.
211209
* @return array|bool result.
212210
*/
213-
protected function fetchRows($all = true, $indexBy = null, $db = null)
211+
protected function fetchRows($all = true, $db = null)
214212
{
215213
if ($db === null) {
216214
$db = Yii::$app->get('mongodb');
@@ -334,7 +332,7 @@ public function all($db = null)
334332
if (!empty($this->emulateExecution)) {
335333
return [];
336334
}
337-
$rows = $this->fetchRows(true, $this->indexBy, $db);
335+
$rows = $this->fetchRows(true, $db);
338336
return $this->populate($rows);
339337
}
340338

0 commit comments

Comments
 (0)