From fc3681a930aab8625b05be71894e2216b74e4635 Mon Sep 17 00:00:00 2001 From: Morten Christensen Date: Tue, 15 Jan 2013 11:56:25 -0100 Subject: [PATCH] Fixes U4-1476 so null values are handled before the overload is determined. --- src/Umbraco.Core/Models/ContentBase.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Umbraco.Core/Models/ContentBase.cs b/src/Umbraco.Core/Models/ContentBase.cs index 86fd4f8866..ee4deeb96d 100644 --- a/src/Umbraco.Core/Models/ContentBase.cs +++ b/src/Umbraco.Core/Models/ContentBase.cs @@ -279,6 +279,12 @@ namespace Umbraco.Core.Models /// Value to set for the Property 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); }