throw an exception if container name/organizer mail is empty
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 12 Jul 2016 11:35:25 +0000 (13:35 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 12 Jul 2016 13:11:03 +0000 (15:11 +0200)
Change-Id: I4cd0884146471949ef11e542796aeb1ed72f1345
Reviewed-on: http://gerrit.tine20.com/customers/3346
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/Controller.php

index c51605b..6452f32 100644 (file)
@@ -236,6 +236,11 @@ class Calendar_Controller extends Tinebase_Controller_Event implements Tinebase_
         } else {
             $containerName = $emailAddress;
         }
+
+        if (empty($containerName)) {
+            Tinebase_Core::getLogger()->err(__METHOD__ . '::' . __LINE__ . ' event organizer does not have an email address');
+            throw new Tinebase_Exception_UnexpectedValue('event organizer does not have an email address');
+        }
         
         try {
             $container = Tinebase_Container::getInstance()->getContainerByName('Calendar', $containerName, Tinebase_Model_Container::TYPE_SHARED);