checks for existing class before calling constructor
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 24 Nov 2014 12:42:20 +0000 (13:42 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 24 Nov 2014 15:10:36 +0000 (16:10 +0100)
Change-Id: Iddb2e2ce967f9526c5af85ba9d07da68dcab066d
Reviewed-on: http://gerrit.tine20.com/customers/1374
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/WebDav/Collection/AbstractContainerTree.php

index 6e0636a..c358656 100644 (file)
@@ -228,6 +228,10 @@ abstract class Tinebase_WebDav_Collection_AbstractContainerTree extends \Sabre\D
                 
                 $objectClass = Tinebase_Application::getInstance()->getApplicationById($container->application_id)->name . '_Frontend_WebDAV_Container';
                 
+                if (! class_exists($objectClass)) {
+                    throw new \Sabre\DAV\Exception\NotFound("Directory $this->_path/$name not found");
+                }
+                 
                 return new $objectClass($container, $this->_useIdAsName);
                 
                 break;