Skip to content

Commit 867b7f3

Browse files
committed
Do not throw if existing value is null
Fixes #6475
1 parent 13fb13e commit 867b7f3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

DNN Platform/Library/Entities/Modules/ModuleController.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2406,9 +2406,10 @@ private void UpdateModuleSettingInternal(int moduleId, string settingName, strin
24062406
dr = DataProvider.GetModuleSetting(moduleId, settingName);
24072407

24082408
string existValue = null;
2409-
if (dr.Read())
2409+
const int SettingValueColumnIndex = 1;
2410+
if (dr.Read() && !dr.IsDBNull(SettingValueColumnIndex))
24102411
{
2411-
existValue = dr.GetString(1);
2412+
existValue = dr.GetString(SettingValueColumnIndex);
24122413
}
24132414

24142415
dr.Close();

0 commit comments

Comments
 (0)