if there are no custom headers, don't throw a notice that breaks the json result...
authorChuck Hagenbuch <chuck@horde.org>
Wed, 15 Jul 2009 02:41:25 +0000 (22:41 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Wed, 15 Jul 2009 14:12:21 +0000 (10:12 -0400)
imp/lib/Compose.php

index 93cca28..b71b739 100644 (file)
@@ -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) {}