[imp] imp cvs head viewing messages with html error

Jan Schneider jan at horde.org
Fri Jul 30 10:41:10 PDT 2004


Zitat von Vijay Mahrra <vijay.mahrra at es.easynet.net>:

> I had a bug in IMP-CVS HEAD
>
> Warning: Invalid argument supplied for foreach() in
> /data/apache/vhosts/www.mahrra.com/htdocs/horde/imp/lib/Identity/imp.php
> on line 311
>
> when viewing messages which had a HTML attachment, not sure why exactly
> but changing the offending line seemed to work:

What *was* $tieaddr actually if not an array?

> Index: imp.php
> ===================================================================
> RCS file: /repository/imp/lib/Identity/imp.php,v
> retrieving revision 1.37
> diff -u -r1.37 imp.php
> --- imp.php     17 May 2004 19:05:43 -0000      1.37
> +++ imp.php     30 Jul 2004 12:01:38 -0000
> @@ -307,7 +307,7 @@
>
>           foreach ($this->_identities as $key => $identity) {
>               $tieaddr = $this->getValue('tieto_addr', $key);
> -            if (!empty($tieaddr)) {
> +            if (!empty($tieaddr) && is_array($tieaddr)) {
>                   foreach ($tieaddr as $val) {
>                       if (!isset($list[$val])) {
>                           $list[$val] = $key;
> --
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org



Jan.

--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting.php


More information about the imp mailing list