diff --git a/src/Umbraco.Web.Common/Profiler/WebProfiler.cs b/src/Umbraco.Web.Common/Profiler/WebProfiler.cs index 9608bad715..8767b450fe 100644 --- a/src/Umbraco.Web.Common/Profiler/WebProfiler.cs +++ b/src/Umbraco.Web.Common/Profiler/WebProfiler.cs @@ -29,7 +29,7 @@ public class WebProfiler : IProfiler public void Start() { MiniProfiler.StartNew(); - MiniProfilerContext.Value = MiniProfiler.Current; + MiniProfilerContext.Value = MiniProfiler.Current!; } public void Stop(bool discardResults = false) => MiniProfilerContext.Value?.Stop(discardResults); @@ -84,7 +84,7 @@ public class WebProfiler : IProfiler if (cookieValue is not null) { - AddSubProfiler(MiniProfiler.FromJson(cookieValue)); + AddSubProfiler(MiniProfiler.FromJson(cookieValue)!); } // If it is a redirect to a relative path (local redirect) diff --git a/src/Umbraco.Web.Common/Profiler/WebProfilerHtml.cs b/src/Umbraco.Web.Common/Profiler/WebProfilerHtml.cs index 733715cf53..31319d8b01 100644 --- a/src/Umbraco.Web.Common/Profiler/WebProfilerHtml.cs +++ b/src/Umbraco.Web.Common/Profiler/WebProfilerHtml.cs @@ -34,7 +34,7 @@ public class WebProfilerHtml : IProfilerHtml var result = StackExchange.Profiling.Internal.Render.Includes( profiler, - context is not null ? context.Request.PathBase + path : null, + context is not null ? context.Request.PathBase + path : string.Empty, true, new List { profiler.Id }, RenderPosition.Right, diff --git a/tests/Umbraco.Tests.Common/Umbraco.Tests.Common.csproj b/tests/Umbraco.Tests.Common/Umbraco.Tests.Common.csproj index 067d2c4058..9b538de97e 100644 --- a/tests/Umbraco.Tests.Common/Umbraco.Tests.Common.csproj +++ b/tests/Umbraco.Tests.Common/Umbraco.Tests.Common.csproj @@ -9,7 +9,6 @@ -