Don't throw error when doing text -> HTML conversion
authorMichael M Slusarz <slusarz@curecanti.org>
Sat, 2 Oct 2010 05:23:58 +0000 (23:23 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sat, 2 Oct 2010 05:24:38 +0000 (23:24 -0600)
imp/lib/Ajax/Application.php

index f0e0c2b..ab4a675 100644 (file)
@@ -1815,7 +1815,9 @@ class IMP_Ajax_Application extends Horde_Core_Ajax_Application
     {
         $imp_compose = $GLOBALS['injector']->getInstance('IMP_Compose')->getOb($this->_vars->imp_compose);
         if (!($imp_contents = $imp_compose->getContentsOb())) {
-            $imp_contents = $GLOBALS['injector']->getInstance('IMP_Contents')->getOb(new IMP_Indices($this->_vars->uid));
+            $imp_contents = $this->_vars->uid
+                ? $GLOBALS['injector']->getInstance('IMP_Contents')->getOb(new IMP_Indices($this->_vars->uid))
+                : null;
         }
 
         return array($imp_compose, $imp_contents);