Skip to content

Commit 6daa25b

Browse files
Port #3857 to release/6.1 (#3877)
1 parent a20f10a commit 6daa25b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4180,7 +4180,7 @@ private SqlDataReader TryFetchInputParameterEncryptionInfo(int timeout,
41804180
{
41814181
// In BatchRPCMode, the actual T-SQL query is in the first parameter and not present as the rpcName, as is the case with non-BatchRPCMode.
41824182
// So input parameters start at parameters[1]. parameters[0] is the actual T-SQL Statement. rpcName is sp_executesql.
4183-
if (_RPCList[i].systemParams.Length > 1)
4183+
if (_RPCList[i].systemParams != null && _RPCList[i].systemParams.Length > 1)
41844184
{
41854185
_RPCList[i].needsFetchParameterEncryptionMetadata = true;
41864186

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4304,7 +4304,7 @@ private SqlDataReader TryFetchInputParameterEncryptionInfo(int timeout,
43044304
{
43054305
// In _batchRPCMode, the actual T-SQL query is in the first parameter and not present as the rpcName, as is the case with non-_batchRPCMode.
43064306
// So input parameters start at parameters[1]. parameters[0] is the actual T-SQL Statement. rpcName is sp_executesql.
4307-
if (_RPCList[i].systemParams.Length > 1)
4307+
if (_RPCList[i].systemParams != null && _RPCList[i].systemParams.Length > 1)
43084308
{
43094309
_RPCList[i].needsFetchParameterEncryptionMetadata = true;
43104310

0 commit comments

Comments
 (0)