diff --git a/src/Collection.php b/src/Collection.php index f8b696dec..b746ea235 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -445,11 +445,11 @@ public function distinct(string $fieldName, $filter = [], array $options = []) */ public function drop(array $options = []) { - $server = select_server($this->manager, $options); - $options = $this->inheritWriteOptions($options); $options = $this->inheritTypeMap($options); + $server = select_server($this->manager, $options); + if (! isset($options['encryptedFields'])) { $options['encryptedFields'] = get_encrypted_fields_from_driver($this->databaseName, $this->collectionName, $this->manager) ?? get_encrypted_fields_from_server($this->databaseName, $this->collectionName, $this->manager, $server);