summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-07-11 17:21:30 +0000
committeralecpl <alec@alec.pl>2009-07-11 17:21:30 +0000
commit713a66fc0fd824906517260c5323d4f8afc919b7 (patch)
treed54b6747992f35ab0593bb13b86b13c4a7c48e29 /program/include
parent0b6e9700f217d03d8f942f5b811f65537c2dff29 (diff)
- prevent from some mcrypt warnings (#1485970)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcmail.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 65bac3813..23637157f 100644
--- a/program/include/rcmail.php
+++ b/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') &&