azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Fix location null checks in UpdateAzCosmosDBAccountRegion.cs

Open plzm opened this issue 6 years ago • 1 comments

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

plzm avatar Mar 09 '20 13:03 plzm

Addressed in https://github.com/Azure/azure-powershell/pull/11388

MehaKaushik avatar Mar 22 '20 20:03 MehaKaushik