Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Minor changes InstallationLocalizedService.cs
support713837b68084
diff --git a/src/Business/Grand.Business.System/Services/Installation/InstallationLocalizedService.cs b/src/Business/Grand.Business.System/Services/Installation/InstallationLocalizedService.csindex d2b68f90b..ac8acb676 100644--- a/src/Business/Grand.Business.System/Services/Installation/InstallationLocalizedService.cs+++ b/src/Business/Grand.Business.System/Services/Installation/InstallationLocalizedService.cs@@ -91,11 +91,11 @@ namespace Grand.Business.System.Services.Installationvar languageNode = xmlDocument.SelectSingleNode(@"//Language");- if (languageNode == null || languageNode.Attributes == null)+ if (languageNode?.Attributes == null)continue;//get language friendly name- var languageName = languageNode.Attributes["Name"].InnerText.Trim();+ var languageName = languageNode.Attributes["Name"]?.InnerText.Trim();//is defaultvar isDefaultAttribute = languageNode.Attributes["IsDefault"];@@ -159,18 +159,18 @@ namespace Grand.Business.System.Services.Installation_availableCollation = new List<InstallationCollation>();var filePath = CommonPath.MapPath("App_Data/Resources/supportedcollation.xml");- var xmlDocument = new XmlDocument();+ var xmlDocument = new XmlDocument { XmlResolver = null };xmlDocument.Load(File.OpenRead(filePath));var collation = xmlDocument.SelectNodes(@"//Collations/Collation");- foreach (XmlNode resNode in collation)+ foreach (XmlNode resNode in collation!){- var resNameAttribute = resNode.Attributes["Name"];+ var resNameAttribute = resNode.Attributes!["Name"];var resValueNode = resNode.SelectSingleNode("Value");- var resourceName = resNameAttribute.Value.Trim();- var resourceValue = resValueNode.InnerText.Trim();+ var resourceName = resNameAttribute!.Value.Trim();+ var resourceValue = resValueNode!.InnerText.Trim();_availableCollation.Add(new InstallationCollation() {Name = resourceName,