From: Chuck Hagenbuch Date: Wed, 15 Jul 2009 02:41:25 +0000 (-0400) Subject: if there are no custom headers, don't throw a notice that breaks the json result... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=610542c9dcbe86d8e2d824c8b26b12db8dce77c7;p=horde.git if there are no custom headers, don't throw a notice that breaks the json result (resulting in the compose window not closing, with no feedback, though the message has been sent) --- diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index 93cca28db..b71b73923 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -495,8 +495,10 @@ class IMP_Compose /* Tack on any site-specific headers. */ try { $headers_result = Horde::loadConfiguration('header.php', '_header'); - foreach ($headers_result as $key => $val) { - $headers->addHeader(trim($key), Horde_String::convertCharset(trim($val), Horde_Nls::getCharset(), $charset)); + if (is_array($headers_result)) { + foreach ($headers_result as $key => $val) { + $headers->addHeader(trim($key), Horde_String::convertCharset(trim($val), Horde_Nls::getCharset(), $charset)); + } } } catch (Horde_Exception $e) {}