Skip to content

Commit e51bc61

Browse files
authored
bugfix pluck
Fix bug in pluck function. Cannot use object of type stdClass as array
1 parent 5c7e240 commit e51bc61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ public function pluck($column, $key = null)
854854
// Convert ObjectID's to strings
855855
if (((string) $key) === '_id') {
856856
$results = $results->map(function ($item) {
857-
$item['_id'] = (string) $item['_id'];
857+
$item->_id = (string) $item->id;
858858

859859
return $item;
860860
});

0 commit comments

Comments
 (0)