mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixed potential NRE issue with SearchSettingsPart export handler.
This issue occured if no SearchFields were stored yet and the user exports Site Settings.
This commit is contained in:
@@ -74,7 +74,7 @@ namespace Orchard.Search.Drivers {
|
||||
}
|
||||
|
||||
protected override void Exporting(SearchSettingsPart part, ExportContentContext context) {
|
||||
context.Element(part.PartDefinition.Name).Add(new XAttribute("SearchFields", part.Retrieve<string>("SearchFields")));
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("SearchFields", part.Retrieve<string>("SearchFields"));
|
||||
}
|
||||
|
||||
protected override void Importing(SearchSettingsPart part, ImportContentContext context) {
|
||||
|
Reference in New Issue
Block a user