From: Alexander Ebert Date: Thu, 12 Dec 2013 22:44:02 +0000 (+0100) Subject: Fixed result if no matched package is accessible X-Git-Tag: 2.0.1~55 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f21a86b29c6b69cd041e57194d63f948c3e6c6d;p=GitHub%2FWoltLab%2FWCF.git Fixed result if no matched package is accessible --- 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 03e4cd8383..b617e8ba8d 100644 --- a/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php +++ b/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php @@ -246,6 +246,20 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction { ); } + // no found packages is accessible + if (empty($packageUpdates)) { + WCF::getTPL()->assign(array( + 'packageUpdates' => array() + )); + + return array( + 'count' => 0, + 'pageCount' => 0, + 'searchID' => 0, + 'template' => WCF::getTPL()->fetch('packageSearchResultList') + ); + } + $search = SearchEditor::create(array( 'userID' => WCF::getUser()->userID, 'searchData' => serialize($packageUpdates),