From b82efbfc95fce2e1ead163223f005df7254e2869 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Mon, 21 Aug 2023 13:33:53 +0000
Subject: [PATCH] prevent php8 warning, fixes #3016

Closes #3016

Merge request studip/studip!2038
---
 app/controllers/quicksearch.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/controllers/quicksearch.php b/app/controllers/quicksearch.php
index 9e1f2f9f700..194f317480a 100644
--- a/app/controllers/quicksearch.php
+++ b/app/controllers/quicksearch.php
@@ -91,7 +91,7 @@ class QuicksearchController extends AuthenticatedController
 
             if ($this->search instanceof StandardSearch && $this->search->extendedLayout) {
                 $formatted['item_name'] = $this->search->getAvatarImageTag($result[0], Avatar::MEDIUM, ['title' => '']) . $formatted['item_name'];
-                if($result[3]) {
+                if (!empty($result[3])) {
                     $formatted['item_description'] = sprintf('%s (%s)', $result[2], $result[3]);
                 } else {
                     $formatted['item_description'] = $result[2];
-- 
GitLab