Fix song history page null parameter error (#5500)

This commit is contained in:
Vaalyn 2022-06-13 18:57:36 +02:00 committed by GitHub
parent aa70489286
commit 0ccbc2b069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ final class HistoryController
);
}
$search_phrase = trim($request->getQueryParam('searchPhrase'));
$search_phrase = trim($request->getQueryParam('searchPhrase') ?? '');
if (!empty($search_phrase)) {
$qb->andWhere('(sh.title LIKE :query OR sh.artist LIKE :query)')
->setParameter('query', '%' . $search_phrase . '%');