From 6a95ff366fbe1b001c7b71deeb1e9afd0e4c4770 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 2 Jan 2022 20:19:25 +0100 Subject: [PATCH] Ensure query is not null before using Trim() --- .../Controllers/ExamineManagementController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.BackOffice/Controllers/ExamineManagementController.cs b/src/Umbraco.Web.BackOffice/Controllers/ExamineManagementController.cs index 008582b6b3..911e50d0a0 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/ExamineManagementController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/ExamineManagementController.cs @@ -64,7 +64,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers public ActionResult GetSearchResults(string searcherName, string query, int pageIndex = 0, int pageSize = 20) { - query = query.Trim(); + query = query?.Trim(); if (query.IsNullOrWhiteSpace()) {