Requesting abstract classes now throws an IllegalLinkException
authorTim Düsterhus <timwolla@arcor.de>
Fri, 22 Jul 2011 12:41:37 +0000 (14:41 +0200)
committerTim Düsterhus <timwolla@arcor.de>
Fri, 22 Jul 2011 12:44:43 +0000 (14:44 +0200)
wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index c53c43a648241e2b9a77bc3da746842f040d8bbd..b345c735101e3c3cac32c3c79e96eb69972d4619 100644 (file)
@@ -74,6 +74,12 @@ class RequestHandler extends SingletonFactory {
                                throw new SystemException("unable to find class '".$className."'", 11000);\r
                        }\r
                        \r
+                       // check whether the class is abstract\r
+                       $reflectionClass = new \ReflectionClass($className);\r
+                       if ($reflectionClass->isAbstract()) {\r
+                               throw new SystemException("class '".$className."' is abstract");\r
+                       }\r
+                       \r
                        $this->activeRequest = new Request($className, $pageName, $pageType);\r
                }\r
                catch (SystemException $e) {\r