From 1d398b1de56b0695e1a8dd26621f5be9399a9669 Mon Sep 17 00:00:00 2001 From: kink Date: Wed, 13 Jul 2011 08:44:04 +0000 Subject: [PATCH] attary may be empty at this point and the sq_fixatts call will generate PHP Warnings. Wrap it in a conditional just like the other sq_fixatts call. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14134 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 1e8fc880..a08920ca 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -2350,15 +2350,17 @@ function sq_sanitize($body, list($free_content, $curpos) = sq_fixstyle($body, $gt+1, $message, $id, $mailbox); if ($free_content != FALSE){ - $attary = sq_fixatts($tagname, - $attary, - $rm_attnames, - $bad_attvals, - $add_attr_to_tag, - $message, - $id, - $mailbox - ); + if ( !empty($attary) ) { + $attary = sq_fixatts($tagname, + $attary, + $rm_attnames, + $bad_attvals, + $add_attr_to_tag, + $message, + $id, + $mailbox + ); + } $trusted .= sq_tagprint($tagname, $attary, $tagtype); $trusted .= $free_content; $trusted .= sq_tagprint($tagname, false, 2); -- 2.25.1