<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Invalid argument supplied for foreach() </title> 
  <pubDate>Fri, 10 Apr 2026 19:28:37 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9821</link> 
  <atom:link rel="self" type="application/rss+xml" title="Invalid argument supplied for foreach() " href="https://bugs.horde.org/ticket/9821/rss" /> 
  <description>Invalid argument supplied for foreach() </description> 
 
   
   
  <item> 
   <title>Just found this error some times in horde&#039;s log - don&#039;t know</title> 
   <description>Just found this error some times in horde&#039;s log - don&#039;t know exactly which action it takes to reproduce. It occurred when I set some mails as read, but this action applyed correctly.

2011-04-06T11:13:41+02:00 WARN: HORDE [imp] PHP ERROR: Invalid argument supplied for foreach() [pid 19465 on line 169 of &quot;/var/www/horde4/imp/lib/Mime/Viewer/Html.php&quot;]

When this error is logged, an server-error-notification is popping up in frontend.</description> 
   <pubDate>Wed, 06 Apr 2011 09:46:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9821#t63213</link> 
  </item> 
   
  <item> 
   <title>Just added Horde::debug($related_part-&gt;getMetadata(&#039;related_</title> 
   <description>Just added Horde::debug($related_part-&gt;getMetadata(&#039;related_cids&#039;)); an line before foreach is called.

It&#039;s reproducable for messages triggered by an alarming kronolith event with email-notification. When viewing the notification-mail the first time in dimp (not cached), the error is logged.


2011-04-07T15:59:54+02:00 DEBUG: Variable information:
NULL

Backtrace:
 1. Horde_Core_Ajax_Application-&gt;doAction() /var/www/horde4/services/ajax.php:60
 2. call_user_func() /usr/share/php/Horde/Core/Ajax/Application.php:95
 3. IMP_Ajax_Application-&gt;showPreview()
 4. IMP_Views_ShowMessage-&gt;showMessage() /var/www/horde4/imp/lib/Ajax/Application.php:1022
 5. IMP_Ui_Message-&gt;getInlineOutput() /var/www/horde4/imp/lib/Views/ShowMessage.php:269
 6. IMP_Contents-&gt;renderMIMEPart() /var/www/horde4/imp/lib/Ui/Message.php:538
 7. Horde_Mime_Viewer_Base-&gt;render() /var/www/horde4/imp/lib/Contents.php:472
 8. IMP_Mime_Viewer_Alternative-&gt;_renderInline() /usr/share/php/Horde/Mime/Viewer/Base.php:156
 9. IMP_Mime_Viewer_Alternative-&gt;_IMPrender() /var/www/horde4/imp/lib/Mime/Viewer/Alternative.php:58
10. IMP_Contents-&gt;renderMIMEPart() /var/www/horde4/imp/lib/Mime/Viewer/Alternative.php:141
11. Horde_Mime_Viewer_Base-&gt;render() /var/www/horde4/imp/lib/Contents.php:472
12. IMP_Mime_Viewer_Html-&gt;_renderInline() /usr/share/php/Horde/Mime/Viewer/Base.php:156
13. IMP_Mime_Viewer_Html-&gt;_IMPrender() /var/www/horde4/imp/lib/Mime/Viewer/Html.php:78
14. Horde::debug() /var/www/horde4/imp/lib/Mime/Viewer/Html.php:168
</description> 
   <pubDate>Thu, 07 Apr 2011 14:04:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9821#t63249</link> 
  </item> 
   
  <item> 
   <title>&gt; It&#039;s reproducable for messages triggered by an alarming kr</title> 
   <description>&gt; It&#039;s reproducable for messages triggered by an alarming kronolith 
&gt; event with email-notification. When viewing the notification-mail the 
&gt; first time in dimp (not cached), the error is logged.

Please provide the message source of a message that triggers this error.</description> 
   <pubDate>Thu, 07 Apr 2011 17:35:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9821#t63280</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; It&#039;s reproducable for messages triggered by an alarming k</title> 
   <description>&gt;&gt; It&#039;s reproducable for messages triggered by an alarming kronolith
&gt;&gt; event with email-notification. When viewing the notification-mail the
&gt;&gt; first time in dimp (not cached), the error is logged.
&gt;
&gt; Please provide the message source of a message that triggers this error.

See attachment</description> 
   <pubDate>Fri, 08 Apr 2011 08:35:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9821#t63309</link> 
  </item> 
   
  <item> 
   <title>Something strange is going on.  I see that message fine, wit</title> 
   <description>Something strange is going on.  I see that message fine, without errors.  But a debug backtrace shows differences.

Yours:

11. Horde_Mime_Viewer_Base-&gt;render() /var/www/horde4/imp/lib/Contents.php:472
12. IMP_Mime_Viewer_Html-&gt;_renderInline() 
/usr/share/php/Horde/Mime/Viewer/Base.php:156
13. IMP_Mime_Viewer_Html-&gt;_IMPrender() 
/var/www/horde4/imp/lib/Mime/Viewer/Html.php:78

Mine:

11. Horde_Mime_Viewer_Base-&gt;render() /disk2/src/horde/imp/lib/Contents.php:472
12. IMP_Mime_Viewer_Related-&gt;_renderInline() /disk2/src/horde/framework/Mime_Vie
wer/lib/Horde/Mime/Viewer/Base.php:156
13. IMP_Mime_Viewer_Related-&gt;_IMPrender() /disk2/src/horde/imp/lib/Mime/Viewer/R
elated.php:58
14. IMP_Contents-&gt;renderMIMEPart() /disk2/src/horde/imp/lib/Mime/Viewer/Related.
php:108
15. Horde_Mime_Viewer_Base-&gt;render() /disk2/src/horde/imp/lib/Contents.php:472
16. IMP_Mime_Viewer_Html-&gt;_renderInline() /disk2/src/horde/framework/Mime_Viewer
/lib/Horde/Mime/Viewer/Base.php:156
17. IMP_Mime_Viewer_Html-&gt;_IMPrender() /disk2/src/horde/imp/lib/Mime/Viewer/Html
.php:78

The difference - there is no mention of the multipart/related handler in yours, which makes no sense since the alternative part lives under the related part and should be parsed by the code in the related part.

Does the &#039;related&#039; entry in imp/config/mime_drivers.php have &#039;inline&#039; set to true?</description> 
   <pubDate>Fri, 08 Apr 2011 18:26:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9821#t63347</link> 
  </item> 
   
  <item> 
   <title>Related has set inline=true, yes.</title> 
   <description>Related has set inline=true, yes.</description> 
   <pubDate>Mon, 11 Apr 2011 12:13:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9821#t63465</link> 
  </item> 
   
  <item> 
   <title>To further debug this issue, we need details of the IMP -&gt; I</title> 
   <description>To further debug this issue, we need details of the IMP -&gt; IMAP/POP communication.

To enable debugging, see instructions contained in imp/config/backends.php (the &#039;debug&#039; config parameter).  

Debugging should not be enabled on a production server,   Attach/post only the portion of the log that directly deals with the problem reported (it may be simplest to clear the log file and then perform the event that causes the error).</description> 
   <pubDate>Mon, 11 Apr 2011 20:09:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9821#t63513</link> 
  </item> 
   
  <item> 
   <title>&gt; To further debug this issue, we need details of the IMP -&gt;</title> 
   <description>&gt; To further debug this issue, we need details of the IMP -&gt; IMAP/POP 
&gt; communication.

Ping?</description> 
   <pubDate>Mon, 18 Apr 2011 22:49:53 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9821#t63870</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
