@@ -1001,7 +1001,7 @@ static bool php_phongo_extract_handshake_data(zval* driver, const char* key, cha
1001
1001
return true;
1002
1002
}
1003
1003
1004
- zvalue = php_array_fetch (driver , key );
1004
+ zvalue = php_array_fetch_deref (driver , key );
1005
1005
1006
1006
if (Z_TYPE_P (zvalue ) != IS_STRING ) {
1007
1007
phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"%s\" handshake option to be a string, %s given" , key , PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P (zvalue ));
@@ -1076,7 +1076,7 @@ static void php_phongo_set_handshake_data(zval* driverOptions)
1076
1076
size_t platform_len = 0 ;
1077
1077
1078
1078
if (driverOptions && php_array_existsc (driverOptions , "driver" )) {
1079
- zval * driver = php_array_fetchc (driverOptions , "driver" );
1079
+ zval * driver = php_array_fetchc_deref (driverOptions , "driver" );
1080
1080
1081
1081
if (Z_TYPE_P (driver ) != IS_ARRAY ) {
1082
1082
phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"driver\" driver option to be an array, %s given" , PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P (driver ));
@@ -1229,7 +1229,7 @@ static bool phongo_manager_set_serverapi_opts(php_phongo_manager_t* manager, zva
1229
1229
return true;
1230
1230
}
1231
1231
1232
- zServerApi = php_array_fetch (driverOptions , "serverApi" );
1232
+ zServerApi = php_array_fetchc_deref (driverOptions , "serverApi" );
1233
1233
1234
1234
if (Z_TYPE_P (zServerApi ) != IS_OBJECT || !instanceof_function (Z_OBJCE_P (zServerApi ), php_phongo_serverapi_ce )) {
1235
1235
phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"serverApi\" driver option to be %s, %s given" , ZSTR_VAL (php_phongo_serverapi_ce -> name ), PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P (zServerApi ));
@@ -1258,7 +1258,7 @@ static bool phongo_manager_set_auto_encryption_opts(php_phongo_manager_t* manage
1258
1258
return true;
1259
1259
}
1260
1260
1261
- zAutoEncryptionOpts = php_array_fetch (driverOptions , "autoEncryption" );
1261
+ zAutoEncryptionOpts = php_array_fetchc_deref (driverOptions , "autoEncryption" );
1262
1262
1263
1263
if (Z_TYPE_P (zAutoEncryptionOpts ) != IS_ARRAY ) {
1264
1264
phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"autoEncryption\" driver option to be array, %s given" , PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P (zAutoEncryptionOpts ));
@@ -1268,15 +1268,15 @@ static bool phongo_manager_set_auto_encryption_opts(php_phongo_manager_t* manage
1268
1268
auto_encryption_opts = mongoc_auto_encryption_opts_new ();
1269
1269
1270
1270
if (php_array_existsc (zAutoEncryptionOpts , "bypassAutoEncryption" )) {
1271
- mongoc_auto_encryption_opts_set_bypass_auto_encryption (auto_encryption_opts , php_array_fetch_bool (zAutoEncryptionOpts , "bypassAutoEncryption" ));
1271
+ mongoc_auto_encryption_opts_set_bypass_auto_encryption (auto_encryption_opts , php_array_fetchc_bool (zAutoEncryptionOpts , "bypassAutoEncryption" ));
1272
1272
}
1273
1273
1274
1274
if (php_array_existsc (zAutoEncryptionOpts , "bypassQueryAnalysis" )) {
1275
- mongoc_auto_encryption_opts_set_bypass_query_analysis (auto_encryption_opts , php_array_fetch_bool (zAutoEncryptionOpts , "bypassQueryAnalysis" ));
1275
+ mongoc_auto_encryption_opts_set_bypass_query_analysis (auto_encryption_opts , php_array_fetchc_bool (zAutoEncryptionOpts , "bypassQueryAnalysis" ));
1276
1276
}
1277
1277
1278
1278
if (php_array_existsc (zAutoEncryptionOpts , "encryptedFieldsMap" )) {
1279
- zval * enc_fields_map = php_array_fetch (zAutoEncryptionOpts , "encryptedFieldsMap" );
1279
+ zval * enc_fields_map = php_array_fetchc_deref (zAutoEncryptionOpts , "encryptedFieldsMap" );
1280
1280
bson_t bson_map = BSON_INITIALIZER ;
1281
1281
1282
1282
if (Z_TYPE_P (enc_fields_map ) != IS_OBJECT && Z_TYPE_P (enc_fields_map ) != IS_ARRAY ) {
@@ -1299,7 +1299,7 @@ static bool phongo_manager_set_auto_encryption_opts(php_phongo_manager_t* manage
1299
1299
}
1300
1300
1301
1301
if (php_array_existsc (zAutoEncryptionOpts , "keyVaultClient" )) {
1302
- zval * key_vault_client = php_array_fetch (zAutoEncryptionOpts , "keyVaultClient" );
1302
+ zval * key_vault_client = php_array_fetchc_deref (zAutoEncryptionOpts , "keyVaultClient" );
1303
1303
1304
1304
if (Z_TYPE_P (key_vault_client ) != IS_OBJECT || !instanceof_function (Z_OBJCE_P (key_vault_client ), php_phongo_manager_ce )) {
1305
1305
phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"keyVaultClient\" autoEncryption option to be %s, %s given" , ZSTR_VAL (php_phongo_manager_ce -> name ), PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P (key_vault_client ));
@@ -1329,7 +1329,7 @@ static bool phongo_manager_set_auto_encryption_opts(php_phongo_manager_t* manage
1329
1329
int plen ;
1330
1330
zend_bool pfree ;
1331
1331
1332
- key_vault_ns = php_array_fetch_string (zAutoEncryptionOpts , "keyVaultNamespace" , & plen , & pfree );
1332
+ key_vault_ns = php_array_fetchc_string (zAutoEncryptionOpts , "keyVaultNamespace" , & plen , & pfree );
1333
1333
1334
1334
if (!phongo_split_namespace (key_vault_ns , & db_name , & coll_name )) {
1335
1335
phongo_throw_exception (PHONGO_ERROR_INVALID_ARGUMENT , "Expected \"keyVaultNamespace\" autoEncryption option to contain a full collection namespace" );
@@ -1352,7 +1352,7 @@ static bool phongo_manager_set_auto_encryption_opts(php_phongo_manager_t* manage
1352
1352
}
1353
1353
1354
1354
if (php_array_existsc (zAutoEncryptionOpts , "kmsProviders" )) {
1355
- zval * kms_providers = php_array_fetch (zAutoEncryptionOpts , "kmsProviders" );
1355
+ zval * kms_providers = php_array_fetchc_deref (zAutoEncryptionOpts , "kmsProviders" );
1356
1356
bson_t bson_providers = BSON_INITIALIZER ;
1357
1357
1358
1358
if (Z_TYPE_P (kms_providers ) != IS_OBJECT && Z_TYPE_P (kms_providers ) != IS_ARRAY ) {
@@ -1371,7 +1371,7 @@ static bool phongo_manager_set_auto_encryption_opts(php_phongo_manager_t* manage
1371
1371
}
1372
1372
1373
1373
if (php_array_existsc (zAutoEncryptionOpts , "schemaMap" )) {
1374
- zval * schema_map = php_array_fetch (zAutoEncryptionOpts , "schemaMap" );
1374
+ zval * schema_map = php_array_fetchc_deref (zAutoEncryptionOpts , "schemaMap" );
1375
1375
bson_t bson_map = BSON_INITIALIZER ;
1376
1376
1377
1377
if (Z_TYPE_P (schema_map ) != IS_OBJECT && Z_TYPE_P (schema_map ) != IS_ARRAY ) {
@@ -1390,7 +1390,7 @@ static bool phongo_manager_set_auto_encryption_opts(php_phongo_manager_t* manage
1390
1390
}
1391
1391
1392
1392
if (php_array_existsc (zAutoEncryptionOpts , "tlsOptions" )) {
1393
- zval * tls_options = php_array_fetch (zAutoEncryptionOpts , "tlsOptions" );
1393
+ zval * tls_options = php_array_fetchc_deref (zAutoEncryptionOpts , "tlsOptions" );
1394
1394
bson_t bson_options = BSON_INITIALIZER ;
1395
1395
1396
1396
if (Z_TYPE_P (tls_options ) != IS_OBJECT && Z_TYPE_P (tls_options ) != IS_ARRAY ) {
@@ -1409,7 +1409,7 @@ static bool phongo_manager_set_auto_encryption_opts(php_phongo_manager_t* manage
1409
1409
}
1410
1410
1411
1411
if (php_array_existsc (zAutoEncryptionOpts , "extraOptions" )) {
1412
- zval * extra_options = php_array_fetch (zAutoEncryptionOpts , "extraOptions" );
1412
+ zval * extra_options = php_array_fetchc_deref (zAutoEncryptionOpts , "extraOptions" );
1413
1413
bson_t bson_options = BSON_INITIALIZER ;
1414
1414
1415
1415
if (Z_TYPE_P (extra_options ) != IS_OBJECT && Z_TYPE_P (extra_options ) != IS_ARRAY ) {
0 commit comments