Fix encrpytion default value
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 22 Dec 2010 05:21:06 +0000 (22:21 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 22 Dec 2010 05:21:06 +0000 (22:21 -0700)
imp/lib/Compose.php

index 546abdb..065a11d 100644 (file)
@@ -1177,7 +1177,9 @@ class IMP_Compose implements ArrayAccess, Countable, Iterator
         }
 
         /* Set up the base message now. */
-        $encrypt = empty($options['encrypt']) ? 0 : $options['encrypt'];
+        $encrypt = empty($options['encrypt'])
+            ? IMP::ENCRYPT_NONE
+            : $options['encrypt'];
         if ($GLOBALS['prefs']->getValue('use_pgp') &&
             !empty($GLOBALS['conf']['gnupg']['path']) &&
             in_array($encrypt, array(IMP_Crypt_Pgp::ENCRYPT, IMP_Crypt_Pgp::SIGN, IMP_Crypt_Pgp::SIGNENC, IMP_Crypt_Pgp::SYM_ENCRYPT, IMP_Crypt_Pgp::SYM_SIGNENC))) {