From 0734a7f34fc817aef54a16ef892eca79fd7c03e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 22 Jul 2011 14:41:37 +0200 Subject: [PATCH] Requesting abstract classes now throws an IllegalLinkException --- .../files/lib/system/request/RequestHandler.class.php | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.20.1