summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcmail.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-11 17:21:30 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-11 17:21:30 +0000
commita3b0e9e377b193bf1c99895af6e2f55d33485419 (patch)
tree5aa86a9ff31908d87b530ce0e927fac269e91a85 /roundcubemail/program/include/rcmail.php
parent12bfd507e8ca0922ed74e0033f1d88ccf2ed30dd (diff)
- prevent from some mcrypt warnings (#1485970)
git-svn-id: https://svn.roundcube.net/trunk@2737 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcmail.php')
-rw-r--r--roundcubemail/program/include/rcmail.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php
index 65bac3813..23637157f 100644
--- a/roundcubemail/program/include/rcmail.php
+++ b/roundcubemail/program/include/rcmail.php
@@ -882,6 +882,8 @@ class rcmail
*/
public function encrypt($clear, $key = 'des_key', $base64 = true)
{
+ if (!$clear)
+ return '';
/*-
* Add a single canary byte to the end of the clear text, which
* will help find out how much of padding will need to be removed
@@ -930,6 +932,9 @@ class rcmail
*/
public function decrypt($cipher, $key = 'des_key', $base64 = true)
{
+ if (!$cipher)
+ return '';
+
$cipher = $base64 ? base64_decode($cipher) : $cipher;
if (function_exists('mcrypt_module_open') &&