From: Alexander Ebert Date: Mon, 17 Jul 2017 12:21:58 +0000 (+0200) Subject: Fixed an empty set of results when searching for packages X-Git-Tag: 3.0.8~26 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff1de9cd2a98c801b677be5f5e652c234b29b7e2;p=GitHub%2FWoltLab%2FWCF.git Fixed an empty set of results when searching for packages --- 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),