From 52d626ee01c245151ab0e997c95a0c8b617f46d5 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 22 Jul 2010 12:39:29 -0600 Subject: [PATCH] Better matching existence checking --- framework/Text_Filter/lib/Horde/Text/Filter/Emails.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/Text_Filter/lib/Horde/Text/Filter/Emails.php b/framework/Text_Filter/lib/Horde/Text/Filter/Emails.php index bb986738b..80c780cdb 100644 --- a/framework/Text_Filter/lib/Horde/Text/Filter/Emails.php +++ b/framework/Text_Filter/lib/Horde/Text/Filter/Emails.php @@ -95,7 +95,7 @@ EOR; $data = "\01\01\01" . base64_encode($data) . "\01\01\01"; } - return $matches[1] . $matches[2] . $matches[9] . + return $matches[1] . $matches[2] . (isset($matches[9]) ? $matches[9] : '') . $data . $matches[4] . $matches[8] . (isset($matches[14]) ? $matches[14] : ''); } @@ -113,9 +113,9 @@ EOR; $class = empty($this->_params['class']) ? '' : ' class="' . $this->_params['class'] . '"'; - $email = ($matches[10] === '') + $email = (!isset($matches[10]) || $matches[10] === '') ? $matches[3] . $matches[5] - : $matches[10] . $matches[11]; + : $matches[10] . (isset($matches[11]) ? $matches[11] : ''); return '' . htmlspecialchars($email) . ''; } -- 2.11.0