1
Vote

Bug introduced in the sorting

description

Hello,
 
I found a bug where you get a nullreferenceexception when a value of a property bag key is null (happened to me).
This bug is found here (in this sample I commented the bug out and proposed a possible solution):
 
    foreach (DictionaryEntry property in properties)
    {
        // sp.Add(new SortedProperties(property.Key.ToString(), property.Value.ToString()));
        sp.Add(new SortedProperties(property.Key != null?property.Key.ToString():string.Empty, property.Value != null? property.Value.ToString(): string.Empty));
    }
 
File: PropertyBagsSettings.aspx (line 402)
 
Kind regards,
Jeroen

comments