Skip to content

Commit

Permalink
Update src/Capsule/Collection.php
Browse files Browse the repository at this point in the history
Co-authored-by: Alessandro Lai <[email protected]>
  • Loading branch information
Vegeeto and Jean85 authored Oct 1, 2024
1 parent a49500b commit d8ed034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Capsule/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private function prepareQuery(string $method, $filters, $data, array $options):

private function translateReadPreference(ReadPreference $readPreference): string
{
if (version_compare(phpversion('mongodb'), '1.20.0', '>=')) {
if (method_exists(ReadPreference::class, 'getModeString')) {
return $readPreference->getModeString();
}

Expand Down

0 comments on commit d8ed034

Please sign in to comment.