@@ -426,7 +426,7 @@ static PHP_METHOD(MongoDB_Driver_ClientEncryption, rewrapManyDataKey)
426
426
}
427
427
428
428
if (options && php_array_existsc (options , "masterKey" )) {
429
- zval * zmasterkey = php_array_fetchc (options , "masterKey" );
429
+ zval * zmasterkey = php_array_fetchc_deref (options , "masterKey" );
430
430
431
431
if (Z_TYPE_P (zmasterkey ) != IS_OBJECT && Z_TYPE_P (zmasterkey ) != IS_ARRAY ) {
432
432
phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"masterKey\" option to be array or object, %s given" , PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P (zmasterkey ));
@@ -550,7 +550,7 @@ static mongoc_client_encryption_opts_t* phongo_clientencryption_opts_from_zval(z
550
550
}
551
551
552
552
if (php_array_existsc (options , "keyVaultClient" )) {
553
- zval * key_vault_client = php_array_fetch (options , "keyVaultClient" );
553
+ zval * key_vault_client = php_array_fetchc_deref (options , "keyVaultClient" );
554
554
555
555
if (Z_TYPE_P (key_vault_client ) != IS_OBJECT || !instanceof_function (Z_OBJCE_P (key_vault_client ), php_phongo_manager_ce )) {
556
556
phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"keyVaultClient\" option to be %s, %s given" , ZSTR_VAL (php_phongo_manager_ce -> name ), PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P (key_vault_client ));
@@ -598,7 +598,7 @@ static mongoc_client_encryption_opts_t* phongo_clientencryption_opts_from_zval(z
598
598
}
599
599
600
600
if (php_array_existsc (options , "kmsProviders" )) {
601
- zval * kms_providers = php_array_fetchc (options , "kmsProviders" );
601
+ zval * kms_providers = php_array_fetchc_deref (options , "kmsProviders" );
602
602
bson_t bson_providers = BSON_INITIALIZER ;
603
603
604
604
if (Z_TYPE_P (kms_providers ) != IS_ARRAY && Z_TYPE_P (kms_providers ) != IS_OBJECT ) {
@@ -616,7 +616,7 @@ static mongoc_client_encryption_opts_t* phongo_clientencryption_opts_from_zval(z
616
616
}
617
617
618
618
if (php_array_existsc (options , "tlsOptions" )) {
619
- zval * tls_options = php_array_fetchc (options , "tlsOptions" );
619
+ zval * tls_options = php_array_fetchc_deref (options , "tlsOptions" );
620
620
bson_t bson_options = BSON_INITIALIZER ;
621
621
622
622
if (Z_TYPE_P (tls_options ) != IS_ARRAY && Z_TYPE_P (tls_options ) != IS_OBJECT ) {
@@ -707,7 +707,7 @@ static mongoc_client_encryption_datakey_opts_t* phongo_clientencryption_datakey_
707
707
}
708
708
709
709
if (php_array_existsc (options , "keyAltNames" )) {
710
- zval * zkeyaltnames = php_array_fetchc (options , "keyAltNames" );
710
+ zval * zkeyaltnames = php_array_fetchc_deref (options , "keyAltNames" );
711
711
HashTable * ht_data ;
712
712
uint32_t keyaltnames_count ;
713
713
char * * keyaltnames ;
@@ -769,7 +769,7 @@ static mongoc_client_encryption_datakey_opts_t* phongo_clientencryption_datakey_
769
769
}
770
770
771
771
if (php_array_existsc (options , "keyMaterial" )) {
772
- zval * keyMaterial = php_array_fetchc (options , "keyMaterial" );
772
+ zval * keyMaterial = php_array_fetchc_deref (options , "keyMaterial" );
773
773
774
774
if (Z_TYPE_P (keyMaterial ) != IS_OBJECT || !instanceof_function (Z_OBJCE_P (keyMaterial ), php_phongo_binary_ce )) {
775
775
phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"keyMaterial\" option to be %s, %s given" , ZSTR_VAL (php_phongo_binary_ce -> name ), PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P (keyMaterial ));
@@ -780,7 +780,7 @@ static mongoc_client_encryption_datakey_opts_t* phongo_clientencryption_datakey_
780
780
}
781
781
782
782
if (php_array_existsc (options , "masterKey" )) {
783
- zval * zmasterkey = php_array_fetchc (options , "masterKey" );
783
+ zval * zmasterkey = php_array_fetchc_deref (options , "masterKey" );
784
784
bson_t masterkey = BSON_INITIALIZER ;
785
785
786
786
if (Z_TYPE_P (zmasterkey ) != IS_OBJECT && Z_TYPE_P (zmasterkey ) != IS_ARRAY ) {
@@ -932,7 +932,7 @@ static mongoc_client_encryption_encrypt_opts_t* phongo_clientencryption_encrypt_
932
932
}
933
933
934
934
if (php_array_existsc (options , "contentionFactor" )) {
935
- mongoc_client_encryption_encrypt_opts_set_contention_factor (opts , php_array_fetch_long (options , "contentionFactor" ));
935
+ mongoc_client_encryption_encrypt_opts_set_contention_factor (opts , php_array_fetchc_long (options , "contentionFactor" ));
936
936
}
937
937
938
938
if (php_array_existsc (options , "keyId" )) {
@@ -954,7 +954,7 @@ static mongoc_client_encryption_encrypt_opts_t* phongo_clientencryption_encrypt_
954
954
int plen ;
955
955
zend_bool pfree ;
956
956
957
- keyaltname = php_array_fetch_string (options , "keyAltName" , & plen , & pfree );
957
+ keyaltname = php_array_fetchc_string (options , "keyAltName" , & plen , & pfree );
958
958
mongoc_client_encryption_encrypt_opts_set_keyaltname (opts , keyaltname );
959
959
960
960
if (pfree ) {
@@ -967,7 +967,7 @@ static mongoc_client_encryption_encrypt_opts_t* phongo_clientencryption_encrypt_
967
967
int plen ;
968
968
zend_bool pfree ;
969
969
970
- algorithm = php_array_fetch_string (options , "algorithm" , & plen , & pfree );
970
+ algorithm = php_array_fetchc_string (options , "algorithm" , & plen , & pfree );
971
971
mongoc_client_encryption_encrypt_opts_set_algorithm (opts , algorithm );
972
972
973
973
if (pfree ) {
@@ -980,7 +980,7 @@ static mongoc_client_encryption_encrypt_opts_t* phongo_clientencryption_encrypt_
980
980
int plen ;
981
981
zend_bool pfree ;
982
982
983
- querytype = php_array_fetch_string (options , "queryType" , & plen , & pfree );
983
+ querytype = php_array_fetchc_string (options , "queryType" , & plen , & pfree );
984
984
mongoc_client_encryption_encrypt_opts_set_query_type (opts , querytype );
985
985
986
986
if (pfree ) {
@@ -991,7 +991,7 @@ static mongoc_client_encryption_encrypt_opts_t* phongo_clientencryption_encrypt_
991
991
if (php_array_existsc (options , "rangeOpts" )) {
992
992
mongoc_client_encryption_encrypt_range_opts_t * range_opts ;
993
993
994
- range_opts = phongo_clientencryption_encrypt_range_opts_from_zval (php_array_fetchc (options , "rangeOpts" ));
994
+ range_opts = phongo_clientencryption_encrypt_range_opts_from_zval (php_array_fetchc_deref (options , "rangeOpts" ));
995
995
996
996
if (!range_opts ) {
997
997
/* Exception already thrown */
0 commit comments