Fixes U4-1553 - YSOD when umbracoUrlName value is null
This commit is contained in:
@@ -405,7 +405,8 @@ namespace Umbraco.Core.Models
|
||||
xml.Add(property.ToXml());
|
||||
|
||||
//Check for umbracoUrlName convention
|
||||
if (property.Alias == "umbracoUrlName" && property.Value.ToString().Trim() != string.Empty)
|
||||
if (property.Alias == "umbracoUrlName" && property.Value != null &&
|
||||
property.Value.ToString().Trim() != string.Empty)
|
||||
xml.SetAttributeValue("urlName", property.Value);
|
||||
}
|
||||
|
||||
|
||||
@@ -1237,7 +1237,8 @@ namespace umbraco.cms.businesslogic.web
|
||||
if (p != null)
|
||||
{
|
||||
x.AppendChild(p.ToXml(xd));
|
||||
if (p.PropertyType.Alias == "umbracoUrlName" && p.Value.ToString().Trim() != string.Empty)
|
||||
if (p.PropertyType.Alias == "umbracoUrlName" && p.Value != null
|
||||
&& p.Value.ToString().Trim() != string.Empty)
|
||||
urlName = p.Value.ToString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user