adds a couple of null checks.
This commit is contained in:
@@ -397,7 +397,7 @@ namespace umbraco.cms.businesslogic
|
||||
{
|
||||
var props = this.GenericProperties;
|
||||
foreach (property.Property p in props)
|
||||
if (p != null && !string.IsNullOrEmpty(p.Value.ToString()))
|
||||
if (p != null && p.Value != null && string.IsNullOrEmpty(p.Value.ToString()) == false)
|
||||
x.AppendChild(p.ToXml(xd));
|
||||
|
||||
// attributes
|
||||
|
||||
@@ -1291,7 +1291,7 @@ namespace umbraco.cms.businesslogic.web
|
||||
public override void XmlPopulate(XmlDocument xd, ref XmlNode x, bool Deep)
|
||||
{
|
||||
string urlName = this.Content.GetUrlSegment().ToLower();
|
||||
foreach (Property p in GenericProperties.Where(p => p != null && !string.IsNullOrEmpty(p.Value.ToString())))
|
||||
foreach (Property p in GenericProperties.Where(p => p != null && p.Value != null && string.IsNullOrEmpty(p.Value.ToString()) == false))
|
||||
x.AppendChild(p.ToXml(xd));
|
||||
|
||||
// attributes
|
||||
|
||||
Reference in New Issue
Block a user