From ff1de9cd2a98c801b677be5f5e652c234b29b7e2 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 17 Jul 2017 14:21:58 +0200 Subject: [PATCH] Fixed an empty set of results when searching for packages --- .../lib/data/package/update/PackageUpdateAction.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php b/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php index ac5aa9988f..98d670251a 100644 --- a/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php +++ b/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php @@ -140,6 +140,13 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction { if (isset($result[$packageUpdateID])) $packageUpdates[$packageUpdateID] = $result[$packageUpdateID]; } + // no matches found + if (empty($packageUpdates)) { + WCF::getTPL()->assign(['packageUpdates' => []]); + + return ['count' => 0, 'pageCount' => 0, 'searchID' => 0, 'template' => WCF::getTPL()->fetch('packageSearchResultList')]; + } + $search = SearchEditor::create([ 'userID' => WCF::getUser()->userID, 'searchData' => serialize($packageUpdates), -- 2.20.1