6.0.0-beta1
9/24/25

[#9821] Invalid argument supplied for foreach()
Summary Invalid argument supplied for foreach()
Queue IMP
Queue Version 5.0
Type Bug
State No Feedback
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester michael.groene (at) zel (dot) uni-hannover (dot) de
Created 04/06/2011 (5285 days ago)
Due
Updated 04/25/2011 (5266 days ago)
Assigned 04/08/2011 (5283 days ago)
Resolved 04/25/2011 (5266 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/25/2011 07:25:55 PM Michael Slusarz State ⇒ No Feedback
 
04/18/2011 10:49:53 PM Michael Slusarz Comment #8 Reply to this comment
To further debug this issue, we need details of the IMP -> IMAP/POP 
communication.
Ping?
04/11/2011 08:09:15 PM Michael Slusarz Comment #7 Reply to this comment
To further debug this issue, we need details of the IMP -> IMAP/POP 
communication.

To enable debugging, see instructions contained in 
imp/config/backends.php (the 'debug' 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).
04/11/2011 12:13:32 PM michael (dot) groene (at) zel (dot) uni-hannover (dot) de Comment #6 Reply to this comment
Related has set inline=true, yes.
04/08/2011 06:26:40 PM Michael Slusarz Comment #5
Assigned to Michael Slusarz
State ⇒ Feedback
Priority ⇒ 1. Low
Reply to this comment
Something strange is going on.  I see that message fine, without 
errors.  But a debug backtrace shows differences.

Yours:

11. Horde_Mime_Viewer_Base->render() /var/www/horde4/imp/lib/Contents.php:472
12. IMP_Mime_Viewer_Html->_renderInline()
/usr/share/php/Horde/Mime/Viewer/Base.php:156
13. IMP_Mime_Viewer_Html->_IMPrender()
/var/www/horde4/imp/lib/Mime/Viewer/Html.php:78

Mine:

11. Horde_Mime_Viewer_Base->render() /disk2/src/horde/imp/lib/Contents.php:472
12. IMP_Mime_Viewer_Related->_renderInline() 
/disk2/src/horde/framework/Mime_Vie
wer/lib/Horde/Mime/Viewer/Base.php:156
13. IMP_Mime_Viewer_Related->_IMPrender() 
/disk2/src/horde/imp/lib/Mime/Viewer/R
elated.php:58
14. IMP_Contents->renderMIMEPart() 
/disk2/src/horde/imp/lib/Mime/Viewer/Related.
php:108
15. Horde_Mime_Viewer_Base->render() /disk2/src/horde/imp/lib/Contents.php:472
16. IMP_Mime_Viewer_Html->_renderInline() 
/disk2/src/horde/framework/Mime_Viewer
/lib/Horde/Mime/Viewer/Base.php:156
17. IMP_Mime_Viewer_Html->_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 'related' entry in imp/config/mime_drivers.php have 'inline' 
set to true?
04/08/2011 08:35:56 AM michael (dot) groene (at) zel (dot) uni-hannover (dot) de Comment #4
New Attachment: msg.txt Download
Reply to this comment
It'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.
Please provide the message source of a message that triggers this error.
See attachment
04/07/2011 05:35:54 PM Michael Slusarz Comment #3 Reply to this comment
It'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.
Please provide the message source of a message that triggers this error.
04/07/2011 02:04:24 PM michael (dot) groene (at) zel (dot) uni-hannover (dot) de Comment #2 Reply to this comment
Just added Horde::debug($related_part->getMetadata('related_cids')); 
an line before foreach is called.

It'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->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->showPreview()
  4. IMP_Views_ShowMessage->showMessage() 
/var/www/horde4/imp/lib/Ajax/Application.php:1022
  5. IMP_Ui_Message->getInlineOutput() 
/var/www/horde4/imp/lib/Views/ShowMessage.php:269
  6. IMP_Contents->renderMIMEPart() /var/www/horde4/imp/lib/Ui/Message.php:538
  7. Horde_Mime_Viewer_Base->render() /var/www/horde4/imp/lib/Contents.php:472
  8. IMP_Mime_Viewer_Alternative->_renderInline() 
/usr/share/php/Horde/Mime/Viewer/Base.php:156
  9. IMP_Mime_Viewer_Alternative->_IMPrender() 
/var/www/horde4/imp/lib/Mime/Viewer/Alternative.php:58
10. IMP_Contents->renderMIMEPart() 
/var/www/horde4/imp/lib/Mime/Viewer/Alternative.php:141
11. Horde_Mime_Viewer_Base->render() /var/www/horde4/imp/lib/Contents.php:472
12. IMP_Mime_Viewer_Html->_renderInline() 
/usr/share/php/Horde/Mime/Viewer/Base.php:156
13. IMP_Mime_Viewer_Html->_IMPrender() 
/var/www/horde4/imp/lib/Mime/Viewer/Html.php:78
14. Horde::debug() /var/www/horde4/imp/lib/Mime/Viewer/Html.php:168

04/06/2011 09:46:28 AM michael (dot) groene (at) zel (dot) uni-hannover (dot) de Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Invalid argument supplied for foreach()
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Just found this error some times in horde's log - don'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 
"/var/www/horde4/imp/lib/Mime/Viewer/Html.php"]

When this error is logged, an server-error-notification is popping up 
in frontend.

Saved Queries