[imp] Minor but annoying bug (mailbox.php line 361)

Marcus I. Ryan marcus@riboflavin.net
Thu, 24 Jan 2002 11:23:10 -0600


Obviously my attachment didn't get marked text/plain, so didn't go
through...rather than having the patch wrap, I just changed

MIME::decode($message->from)

to

(IsSet($message->subject)?MIME::decode($message->subject):_("[No
Subject]"))

in lines 347, 350, and 361

-- 
Marcus I. Ryan, marcus@riboflavin.net
-----------------------------------------------------------------------
 "Love is a snowmobile racing across the tundra and then suddenly it
 flips over, pinning you underneath.  At night, the ice weasels come."
                 -- Matt Groening
-----------------------------------------------------------------------


Quoting "Marcus I. Ryan" <marcus@riboflavin.net>:

> mailbox.php displays applied filter mesages, but doesn't check if
> any
> values are not set (specifically $message->subject).  When a
> message
> without a subject is filtered, I instead get an error that subject
> is
> undefined in mailbox.php line 361, and the rest of the page won't
> display correctly (headers already produced, page compression
> turned
> on, so I just get garbage).
> 
> I'm just learning PHP, so double-check I've done this "The Best
> Way",
> but the attached patch appears to fix it (though some messages
> return
> "" instaled of "[No Subject]").
> 
> Another question is in IMP how do I specify the mime type for an
> attachment?  The patch should already be text/plain, but say I
> submit
> a PDF document, how can I tell IMP to send it as text/plain so it
> gets
> through the filter?
> 
> Lastly, is this the proper method of doing a patch? (diff -u
> file1
> file2) or is there a better method.
> 
> I'm just learning PHP, and I've never really worked with anyone
> else
> on programming projects on UNIX, so I'm still learning about
> diff,
> patch, etc.  I'm trying to get to the point where I can just
> submit
> patches instead of saying "Hey! Fix this!" :)
> 
> -- 
> Marcus I. Ryan, marcus@riboflavin.net
> -----------------------------------------------------------------------
>  "Love is a snowmobile racing across the tundra and then suddenly
> it
>  flips over, pinning you underneath.  At night, the ice weasels
> come."
>                  -- Matt Groening
> -----------------------------------------------------------------------
> 
> 
> 
> 
> 
>