Fixes U4-1476 so null values are handled before the overload is determined.

This commit is contained in:
Morten Christensen
2013-01-15 11:56:25 -01:00
parent 35052c626a
commit fc3681a930

View File

@@ -279,6 +279,12 @@ namespace Umbraco.Core.Models
/// <param name="value">Value to set for the Property</param>
public virtual void SetValue(string propertyTypeAlias, object value)
{
if (value == null)
{
SetValueOnProperty(propertyTypeAlias, value);
return;
}
// .NET magic to call one of the 'SetPropertyValue' handlers with matching signature
((dynamic)this).SetPropertyValue(propertyTypeAlias, (dynamic)value);
}