diff --git a/src/Umbraco.Core/Models/CultureImpact.cs b/src/Umbraco.Core/Models/CultureImpact.cs index 0b035c1703..ca18985941 100644 --- a/src/Umbraco.Core/Models/CultureImpact.cs +++ b/src/Umbraco.Core/Models/CultureImpact.cs @@ -25,7 +25,6 @@ namespace Umbraco.Core.Models if (content == null) throw new ArgumentNullException(nameof(content)); if (savingCultures == null) throw new ArgumentNullException(nameof(savingCultures)); if (savingCultures.Length == 0) throw new ArgumentException(nameof(savingCultures)); - if (defaultCulture == null) throw new ArgumentNullException(nameof(defaultCulture)); var cultureForInvariantErrors = savingCultures.Any(x => x.InvariantEquals(defaultCulture)) //the default culture is being flagged for saving so use it diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index a3788e4590..a0a904b741 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -666,7 +666,7 @@ namespace Umbraco.Web.Editors //The default validation language will be either: The default languauge, else if the content is brand new and the default culture is // not marked to be saved, it will be the first culture in the list marked for saving. - var defaultCulture = _allLangs.Value.First(x => x.Value.IsDefault).Key; + var defaultCulture = _allLangs.Value.Values.FirstOrDefault(x => x.IsDefault)?.CultureName; var cultureForInvariantErrors = CultureImpact.GetCultureForInvariantErrors( contentItem.PersistedContent, contentItem.Variants.Where(x => x.Save).Select(x => x.Culture).ToArray(),