6.0.0-beta1
9/20/25

[#5601] is_null() check in imp/lib/MIME/Contents.php
Summary is_null() check in imp/lib/MIME/Contents.php
Queue IMP
Queue Version 4.1.4
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester tansy (at) pacific (dot) net (dot) sg
Created 08/05/2007 (6621 days ago)
Due
Updated 08/07/2007 (6619 days ago)
Assigned 08/06/2007 (6620 days ago)
Resolved 08/07/2007 (6619 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/07/2007 07:30:24 PM Michael Slusarz Comment #3
State ⇒ Resolved
Reply to this comment
Seems like it would be better to trap the error earlier, at the point
that $this->_message gets set to null (or never gets set to
not-null).
In HEAD/4.2 we do a much better job of trying to catch precisely this 
in IMP_Contents' constructor.
But I'm not strongly opposed to putting the check in.
Michael, any opinion?
I'll go ahead and put it in for 4.1.5, but not HEAD.  In HEAD, if this 
ever does occur, we need to catch it earlier anyway.
08/06/2007 02:09:21 AM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Assigned to Michael Slusarz
Reply to this comment
Seems like it would be better to trap the error earlier, at the point 
that $this->_message gets set to null (or never gets set to not-null). 
But I'm not strongly opposed to putting the check in. Michael, any 
opinion?
08/05/2007 11:24:58 AM tansy (at) pacific (dot) net (dot) sg Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ is_null() check in imp/lib/MIME/Contents.php
Queue ⇒ IMP
State ⇒ Unconfirmed
Reply to this comment
Hi,



In function findBody(), is it possible to include a



if(is_null($this->_message)){ return null; }



before the section of code that looks for potential body parts?



We had some malformed spam that result in $this->_message being null, 
and thus causing IMP to fail if it proceeds to the next section.



Thanking in advance.

Saved Queries