From: Michael J. Rubinsky Date: Sat, 17 Jan 2009 22:08:39 +0000 (-0500) Subject: Checking existence for an array element on a string will always evaluate to 'true' - X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3fcc166e4adf4156865e9d1ce74f8ab01f0a9739;p=horde.git Checking existence for an array element on a string will always evaluate to 'true' - need to add additional checks for an array here as well. --- diff --git a/framework/Mime/lib/Horde/Mime.php b/framework/Mime/lib/Horde/Mime.php index a0dcfa062..f201be61f 100644 --- a/framework/Mime/lib/Horde/Mime.php +++ b/framework/Mime/lib/Horde/Mime.php @@ -209,8 +209,8 @@ class Horde_Mime $text = ''; foreach ($addresses as $addr) { // Check for groups. - if (empty($addr['groupname'])) { - if (empty($addr['personal'])) { + if (!is_array($addr) || (is_array($addr) && empty($addr['groupname']))) { + if (!is_array($addr) || (is_array($addr) && empty($addr['personal']))) { $personal = ''; } else { if (($addr['personal'][0] == '"') &&