@@ -426,7 +426,7 @@ static PHP_METHOD(MongoDB_Driver_ClientEncryption, rewrapManyDataKey)
426426 }
427427
428428 if (options && php_array_existsc (options , "masterKey" )) {
429- zval * zmasterkey = php_array_fetchc (options , "masterKey" );
429+ zval * zmasterkey = php_array_fetchc_deref (options , "masterKey" );
430430
431431 if (Z_TYPE_P (zmasterkey ) != IS_OBJECT && Z_TYPE_P (zmasterkey ) != IS_ARRAY ) {
432432 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
550550 }
551551
552552 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" );
554554
555555 if (Z_TYPE_P (key_vault_client ) != IS_OBJECT || !instanceof_function (Z_OBJCE_P (key_vault_client ), php_phongo_manager_ce )) {
556556 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
598598 }
599599
600600 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" );
602602 bson_t bson_providers = BSON_INITIALIZER ;
603603
604604 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
616616 }
617617
618618 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" );
620620 bson_t bson_options = BSON_INITIALIZER ;
621621
622622 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_
707707 }
708708
709709 if (php_array_existsc (options , "keyAltNames" )) {
710- zval * zkeyaltnames = php_array_fetchc (options , "keyAltNames" );
710+ zval * zkeyaltnames = php_array_fetchc_deref (options , "keyAltNames" );
711711 HashTable * ht_data ;
712712 uint32_t keyaltnames_count ;
713713 char * * keyaltnames ;
@@ -769,7 +769,7 @@ static mongoc_client_encryption_datakey_opts_t* phongo_clientencryption_datakey_
769769 }
770770
771771 if (php_array_existsc (options , "keyMaterial" )) {
772- zval * keyMaterial = php_array_fetchc (options , "keyMaterial" );
772+ zval * keyMaterial = php_array_fetchc_deref (options , "keyMaterial" );
773773
774774 if (Z_TYPE_P (keyMaterial ) != IS_OBJECT || !instanceof_function (Z_OBJCE_P (keyMaterial ), php_phongo_binary_ce )) {
775775 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_
780780 }
781781
782782 if (php_array_existsc (options , "masterKey" )) {
783- zval * zmasterkey = php_array_fetchc (options , "masterKey" );
783+ zval * zmasterkey = php_array_fetchc_deref (options , "masterKey" );
784784 bson_t masterkey = BSON_INITIALIZER ;
785785
786786 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_
932932 }
933933
934934 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" ));
936936 }
937937
938938 if (php_array_existsc (options , "keyId" )) {
@@ -954,7 +954,7 @@ static mongoc_client_encryption_encrypt_opts_t* phongo_clientencryption_encrypt_
954954 int plen ;
955955 zend_bool pfree ;
956956
957- keyaltname = php_array_fetch_string (options , "keyAltName" , & plen , & pfree );
957+ keyaltname = php_array_fetchc_string (options , "keyAltName" , & plen , & pfree );
958958 mongoc_client_encryption_encrypt_opts_set_keyaltname (opts , keyaltname );
959959
960960 if (pfree ) {
@@ -967,7 +967,7 @@ static mongoc_client_encryption_encrypt_opts_t* phongo_clientencryption_encrypt_
967967 int plen ;
968968 zend_bool pfree ;
969969
970- algorithm = php_array_fetch_string (options , "algorithm" , & plen , & pfree );
970+ algorithm = php_array_fetchc_string (options , "algorithm" , & plen , & pfree );
971971 mongoc_client_encryption_encrypt_opts_set_algorithm (opts , algorithm );
972972
973973 if (pfree ) {
@@ -980,7 +980,7 @@ static mongoc_client_encryption_encrypt_opts_t* phongo_clientencryption_encrypt_
980980 int plen ;
981981 zend_bool pfree ;
982982
983- querytype = php_array_fetch_string (options , "queryType" , & plen , & pfree );
983+ querytype = php_array_fetchc_string (options , "queryType" , & plen , & pfree );
984984 mongoc_client_encryption_encrypt_opts_set_query_type (opts , querytype );
985985
986986 if (pfree ) {
@@ -991,7 +991,7 @@ static mongoc_client_encryption_encrypt_opts_t* phongo_clientencryption_encrypt_
991991 if (php_array_existsc (options , "rangeOpts" )) {
992992 mongoc_client_encryption_encrypt_range_opts_t * range_opts ;
993993
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" ));
995995
996996 if (!range_opts ) {
997997 /* Exception already thrown */
0 commit comments