Skip to content

Commit eee864a

Browse files
committed
Ensure Client's $writeConcern property is initialized
Fixes a bug introduced in 21b7d92 for PHPLIB-200
1 parent 818e450 commit eee864a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Client.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Client
2525
private $manager;
2626
private $uri;
2727
private $typeMap;
28+
private $writeConcern;
2829

2930
/**
3031
* Constructs a new Client instance.
@@ -63,6 +64,7 @@ public function __construct($uri = 'mongodb://127.0.0.1/', array $uriOptions = [
6364
unset($driverOptions['typeMap']);
6465

6566
$this->manager = new Manager($uri, $uriOptions, $driverOptions);
67+
$this->writeConcern = $this->manager->getWriteConcern();
6668
}
6769

6870
/**
@@ -77,6 +79,7 @@ public function __debugInfo()
7779
'manager' => $this->manager,
7880
'uri' => $this->uri,
7981
'typeMap' => $this->typeMap,
82+
'writeConcern' => $this->writeConcern,
8083
];
8184
}
8285

0 commit comments

Comments
 (0)