Ensure query is not null before using Trim()
This commit is contained in:
committed by
Sebastiaan Janssen
parent
c3b619fbbf
commit
6a95ff366f
@@ -64,7 +64,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
|
||||
public ActionResult<SearchResults> GetSearchResults(string searcherName, string query, int pageIndex = 0, int pageSize = 20)
|
||||
{
|
||||
query = query.Trim();
|
||||
query = query?.Trim();
|
||||
|
||||
if (query.IsNullOrWhiteSpace())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user