From fa3029a59e6e6056de9c50215c1b9676dfac513c Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 22 May 2014 07:45:21 +0000 Subject: [PATCH] fix empty needle warning on compose change profile/signature --- mail/inc/class.mail_compose.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index f3384b0973..4daf126cf1 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -603,12 +603,12 @@ class mail_compose else { // try the old way - $found = strpos($content['body'],trim($oldSigText)); + $found = (strlen(trim($oldSigText))>0?strpos($content['body'],trim($oldSigText)):false); } } else { - $found = strpos($content['body'],trim($oldSigText)); + $found = (strlen(trim($oldSigText))>0?strpos($content['body'],trim($oldSigText)):false); } if ($found !== false && $_oldSig != -2 && !(empty($oldSigText) || trim($this->convertHTMLToText($oldSigText,true,true)) ==''))