File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,7 @@ private function createClientEncryption(string $id, stdClass $o): void
333
333
]);
334
334
335
335
$ clientEncryptionOpts = [];
336
+ $ clientId = null ;
336
337
337
338
if (isset ($ o ->clientEncryptionOpts )) {
338
339
assertIsObject ($ o ->clientEncryptionOpts );
@@ -341,7 +342,10 @@ private function createClientEncryption(string $id, stdClass $o): void
341
342
342
343
if (isset ($ clientEncryptionOpts ['keyVaultClient ' ])) {
343
344
assertIsString ($ clientEncryptionOpts ['keyVaultClient ' ]);
344
- $ clientEncryptionOpts ['keyVaultClient ' ] = $ this ->entityMap ->getClient ($ clientEncryptionOpts ['keyVaultClient ' ])->getManager ();
345
+ /* Record the keyVaultClient's ID, which we'll later use to track
346
+ * the parent client in the entity map. */
347
+ $ clientId = $ clientEncryptionOpts ['keyVaultClient ' ];
348
+ $ clientEncryptionOpts ['keyVaultClient ' ] = $ this ->entityMap ->getClient ($ clientId )->getManager ();
345
349
}
346
350
347
351
if (isset ($ clientEncryptionOpts ['kmsProviders ' ])) {
@@ -384,7 +388,7 @@ private function createClientEncryption(string $id, stdClass $o): void
384
388
}
385
389
}
386
390
387
- $ this ->entityMap ->set ($ id , new ClientEncryption ($ clientEncryptionOpts ));
391
+ $ this ->entityMap ->set ($ id , new ClientEncryption ($ clientEncryptionOpts ), $ clientId );
388
392
}
389
393
390
394
private function createEntityCollector (string $ clientId , stdClass $ o ): void
You can’t perform that action at this time.
0 commit comments