From: Marcel Werk Date: Tue, 9 Aug 2011 17:31:27 +0000 (+0200) Subject: Fixed parameter validation and missing use tags X-Git-Tag: 2.0.0_Beta_1~1898 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0ef0ec435742b8a17f25885310eb202c5d075914;p=GitHub%2FWoltLab%2FWCF.git Fixed parameter validation and missing use tags --- diff --git a/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php b/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php index c67fb0c667..af830cf6d7 100755 --- a/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php @@ -5,6 +5,7 @@ use wcf\data\option\Option; use wcf\form\AbstractForm; use wcf\system\cache\CacheHandler; use wcf\system\exception\SystemException; +use wcf\system\exception\UserInputException; use wcf\util\ClassUtil; /** diff --git a/wcfsetup/install/files/lib/acp/page/PackageViewPage.class.php b/wcfsetup/install/files/lib/acp/page/PackageViewPage.class.php index b91e54b17c..05141b848f 100755 --- a/wcfsetup/install/files/lib/acp/page/PackageViewPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/PackageViewPage.class.php @@ -1,8 +1,9 @@ packageID = intval($_REQUEST['packageID']); + $this->package = new Package($this->packageID); + if (!$this->package->packageID) { + throw new IllegalLinkException(); + } } /** @@ -73,15 +78,9 @@ class PackageViewPage extends AbstractPage { parent::readData(); // get package data - try { - $this->package = new Package($this->packageID); - $this->requiredPackages = $this->package->getRequiredPackages(); - $this->dependentPackages = $this->package->getDependentPackages(); - $this->dependencies = $this->package->getDependencies(); - } - catch (SystemException $e) { - throw new IllegalLinkException(); - } + $this->requiredPackages = $this->package->getRequiredPackages(); + $this->dependentPackages = $this->package->getDependentPackages(); + $this->dependencies = $this->package->getDependencies(); } /**