aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 7cad3b168..30aa30048 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2945,8 +2945,14 @@ function mail_store($arr) {
$arr['body'] = escape_tags($arr['body']);
}
- if(array_key_exists('attach',$arr) && is_array($arr['attach']))
- $arr['attach'] = json_encode($arr['attach']);
+ if(array_key_exists('attach',$arr)) {
+ if(is_array($arr['attach'])) {
+ $arr['attach'] = json_encode($arr['attach']);
+ }
+ }
+ else {
+ $arr['attach'] = '';
+ }
$arr['account_id'] = ((x($arr,'account_id')) ? intval($arr['account_id']) : 0);
$arr['mid'] = ((x($arr,'mid')) ? notags(trim($arr['mid'])) : random_string());
@@ -2957,6 +2963,7 @@ function mail_store($arr) {
$arr['title'] = ((x($arr,'title')) ? trim($arr['title']) : '');
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? notags(trim($arr['parent_mid'])) : '');
$arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : '');
+ $arr['sig'] = ((x($arr,'sig')) ? trim($arr['sig']) : '');
$arr['conv_guid'] = ((x($arr,'conv_guid')) ? trim($arr['conv_guid']) : '');
$arr['mail_mimetype'] = ((x($arr,'mail_mimetype')) ? trim($arr['mail_mimetype']) : 'text/bbcode');