Fix undefined error warning.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 10 Feb 2010 18:49:27 +0000 (11:49 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 11 Feb 2010 08:24:53 +0000 (01:24 -0700)
imp/lib/Compose.php

index 5749d60..93c42e9 100644 (file)
@@ -322,9 +322,9 @@ class IMP_Compose
 
         /* Add the message to the mailbox. */
         try {
-            if ($this->getMetadata('autodraft')) {
-                $old_uid = $this->getMetadata('draft_uid');
-            }
+            $old_uid = $this->getMetadata('autodraft')
+                ? $this->getMetadata('draft_uid')
+                : null;
 
             $ids = $GLOBALS['imp_imap']->ob()->append($drafts_mbox, array(array('data' => $data, 'flags' => $append_flags, 'messageid' => $headers->getValue('message-id'))));