From 0a7e698883e6a84efbff5c2899aefefef95fac63 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle Date: Mon, 4 Apr 2022 09:21:52 +0200 Subject: [PATCH] Fix non-nullable array to nullable --- src/Umbraco.Core/Models/CultureImpact.cs | 2 +- src/Umbraco.Web.BackOffice/Controllers/ContentController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Models/CultureImpact.cs b/src/Umbraco.Core/Models/CultureImpact.cs index 2f4364b61b..fec02093d7 100644 --- a/src/Umbraco.Core/Models/CultureImpact.cs +++ b/src/Umbraco.Core/Models/CultureImpact.cs @@ -21,7 +21,7 @@ namespace Umbraco.Cms.Core.Models /// /// /// - public static string? GetCultureForInvariantErrors(IContent? content, string[] savingCultures, string? defaultCulture) + public static string? GetCultureForInvariantErrors(IContent? content, string?[] savingCultures, string? defaultCulture) { if (content == null) throw new ArgumentNullException(nameof(content)); if (savingCultures == null) throw new ArgumentNullException(nameof(savingCultures)); diff --git a/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs b/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs index 5e531c1eb4..66c103b810 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs @@ -843,7 +843,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers var defaultCulture = _allLangs.Value.Values.FirstOrDefault(x => x.IsDefault)?.IsoCode; var cultureForInvariantErrors = CultureImpact.GetCultureForInvariantErrors( contentItem.PersistedContent, - contentItem.Variants.Where(x => x.Save).Select(x => x.Culture).WhereNotNull().ToArray(), + contentItem.Variants.Where(x => x.Save).Select(x => x.Culture).ToArray(), defaultCulture); //get the updated model