Skip to content

Commit d96bc6c

Browse files
committed
Use new BSON value conversion function when encrypting data
Since the encrypted data will always be a BSON binary object, there is no reason to use the legacy function to avoid receiving a Document or PackedArray instance.
1 parent 6ff4c4c commit d96bc6c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/MongoDB/ClientEncryption.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,8 +1028,7 @@ static void phongo_clientencryption_encrypt(php_phongo_clientencryption_t* clien
10281028
goto cleanup;
10291029
}
10301030

1031-
/** Use the legacy decoder to return PHP types instead of BSON types */
1032-
if (!phongo_bson_value_to_zval_legacy(&ciphertext, zciphertext)) {
1031+
if (!phongo_bson_value_to_zval(&ciphertext, zciphertext)) {
10331032
/* Exception already thrown */
10341033
goto cleanup;
10351034
}

0 commit comments

Comments
 (0)