[dev] [cvs] commit: imp/lib/MIME Headers.php

Eric Jon Rostetter eric.rostetter at physics.utexas.edu
Wed Feb 1 20:44:54 PST 2006


Quoting Eric Jon Rostetter <eric.rostetter at physics.utexas.edu>:

> This does break everything for me.  Simply removing the getOb() function
> (using the inherited one) gives only half the changes (it appears okay
> that way in the mailbox listing, but not in the actual message view).
>
> With the above getOb, a reply et al fails to get any of the headers
> to pre-fill in the headers (to, subject, etc).

The following patch works for me...

Index: MIME/Headers.php
===================================================================
RCS file: /repository/imp/lib/MIME/Headers.php,v
retrieving revision 1.92.2.18
diff -r1.92.2.18 Headers.php
158c158
<         $array = $this->getOb($field);
---
>         $array = $this->myGetOb($field);
270c270,271
<     function getOb($field)
---
>
>     function myGetOb($field)

This seems to fix all the list address problems, without breaking the
reply et al.

It isn't correct though, and it seems to cause the following warning:

httpd: PHP Notice:  Array to string conversion in  
/httpd/horde/imp/lib/IMP.php on line 525

It appears in "myGetOb()" that $this->getValue() is returning an array,
and passing that to IMP::parseAddressList() which apparently expects a string
instead of an array, hence causing the above warning...

Perhaps in IMP::parseAddressList() it should check for the ':' in
$address[0] instead of in $address?  The list name (with colon) would
always be the first address in the array, no?

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Go Longhorns!


More information about the dev mailing list