From: Tim Düsterhus Date: Fri, 22 Jul 2011 12:41:37 +0000 (+0200) Subject: Requesting abstract classes now throws an IllegalLinkException X-Git-Tag: 2.0.0_Beta_1~1974^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0734a7f34fc817aef54a16ef892eca79fd7c03e9;p=GitHub%2FWoltLab%2FWCF.git Requesting abstract classes now throws an IllegalLinkException --- diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index c53c43a648..b345c73510 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -74,6 +74,12 @@ class RequestHandler extends SingletonFactory { throw new SystemException("unable to find class '".$className."'", 11000); } + // check whether the class is abstract + $reflectionClass = new \ReflectionClass($className); + if ($reflectionClass->isAbstract()) { + throw new SystemException("class '".$className."' is abstract"); + } + $this->activeRequest = new Request($className, $pageName, $pageType); } catch (SystemException $e) {