azure-powershell
azure-powershell copied to clipboard
Fix location null checks in UpdateAzCosmosDBAccountRegion.cs
UpdateAzCosmosDBAccountRegion.cs
Fix location check. Currently checks if string array OR object array are null, but then attempts to iterate through both of them; if only one is specified as is typical when selecting parameter set, then a Null Reference Exception is thrown.
Reference: https://docs.microsoft.com/en-us/powershell/module/az.cosmosdb/update-azcosmosdbaccountregion
Code: https://github.com/Azure/azure-powershell/blob/master/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccountRegion.cs#L76
Addressed in https://github.com/Azure/azure-powershell/pull/11388