We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1dbe3f commit 8f1872dCopy full SHA for 8f1872d
src/Query.php
@@ -212,7 +212,9 @@ public function buildCursor($db = null)
212
*/
213
protected function fetchRows($all = true, $indexBy = null, $db = null)
214
{
215
- $db = $db === null ? yii::$app->mongodb : $db;
+ if ($db === null) {
216
+ $db = Yii::$app->get('mongodb');
217
+ }
218
$cursor = $this->buildCursor($db);
219
$token = 'fetch cursor id = ' . $cursor->getId();
220
if($db->enableLogging)
0 commit comments