Merge branch '2013.03'
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 8 Oct 2013 12:17:12 +0000 (14:17 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 8 Oct 2013 12:17:12 +0000 (14:17 +0200)
tine20/Filemanager/Controller/Node.php

index d5d7728..512f361 100644 (file)
@@ -1127,6 +1127,7 @@ class Filemanager_Controller_Node extends Tinebase_Controller_Record_Abstract
      * 
      * @param string $_flatpath
      * @return boolean
+     * @throws Tinebase_Exception_NotFound
      */
     protected function _deleteNode($_flatpath)
     {
@@ -1144,6 +1145,11 @@ class Filemanager_Controller_Node extends Tinebase_Controller_Record_Abstract
         $success = $this->_deleteNodeInBackend($pathRecord);
         
         if ($success && ! $parentPathRecord->container) {
+            
+            if (! is_object($pathRecord->container)) {
+                throw new Tinebase_Exception_NotFound('Container not found');
+            }
+            
             if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ 
                 . ' Delete container ' . $pathRecord->container->name);
             Tinebase_Container::getInstance()->delete($pathRecord->container->getId());