From eea5d470d6cf72e793c5c1b5aa67e1c609cf181f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 25 Sep 2013 01:13:37 +0200 Subject: [PATCH] Fixed small issue --- .../files/lib/page/DeletedContentListPage.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/page/DeletedContentListPage.class.php b/wcfsetup/install/files/lib/page/DeletedContentListPage.class.php index fdc755f47a..8f17c6a430 100644 --- a/wcfsetup/install/files/lib/page/DeletedContentListPage.class.php +++ b/wcfsetup/install/files/lib/page/DeletedContentListPage.class.php @@ -40,14 +40,15 @@ class DeletedContentListPage extends MultipleLinkPage { // get object type if (isset($_REQUEST['objectType'])) { $this->objectType = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.deletedContent', $_REQUEST['objectType']); - if ($this->objectType === null) { - throw new IllegalLinkException(); - } } else { // use first object type $objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.deletedContent'); - $this->objectType = reset($objectTypes); + if (!empty($objectTypes)) $this->objectType = reset($objectTypes); + } + + if ($this->objectType === null) { + throw new IllegalLinkException(); } } -- 2.20.1