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 ac1cca1 commit 380e222Copy full SHA for 380e222
src/Monolog/Handler/MongoDBHandler.php
@@ -51,7 +51,7 @@ class MongoDBHandler extends AbstractProcessingHandler
51
public function __construct(Client|Manager $mongodb, string $database, string $collection, int|string|Level $level = Level::Debug, bool $bubble = true)
52
{
53
if ($mongodb instanceof Client) {
54
- $this->collection = $mongodb->getCollection($database, $collection);
+ $mongodb->(method_exists($mongodb, 'getCollection') ? 'getCollection' : 'selectCollection')($database, $collection);
55
} else {
56
$this->manager = $mongodb;
57
$this->namespace = $database . '.' . $collection;
0 commit comments