<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="http://bugs.horde.org/themes/feed-rss.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <title>Fatal error in IMP::parseIndicesList method (Unsupported operand types)</title>
  <pubDate>Thu, 20 Nov 2008 09:15:54 -0500</pubDate>
  <link>http://bugs.horde.org/ticket/6994</link>
  <atom:link rel="self" type="application/rss+xml" title="Fatal error in IMP::parseIndicesList method (Unsupported operand types)" href="http://bugs.horde.org/ticket/6994/rss" />
  <description>Fatal error in IMP::parseIndicesList method (Unsupported operand types)</description>

  
  
  <item>
   <title>
Some users complain about an error that appears when they </title>
   <description>
Some users complain about an error that appears when they reply an email:

Fatal error: Unsupported operand types in
/usr/share/horde3/imp/lib/IMP.php on line 1143 

My guess is that the recursive call in the line 1143 sometimes return false and then the + operation fail:

      } else {
            /* We are dealing with format #2. */
            foreach ($indices as $key =&gt; $val) {
                if ($GLOBALS['imp_search']-&gt;isSearchMbox($key)) {
                    $res = IMP::parseIndicesList($val);
                    if ($res) $msgList += $res;
                } else {
                    /* Make sure we don't have any duplicate keys. */
                    $msgList[$key] = is_array($val) ? array_unique($val) : array($val);
                }
            }
        }

I attach a patch.
</description>
   <pubDate>Mon, 30 Jun 2008 05:12:25 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6994#t46979</link>
  </item>
  <item>
   <title>
The code I pasted in this comment has been already patched</title>
   <description>
The code I pasted in this comment has been already patched, the original code follows. I also forgot to put the filename: lib/IMP.php

       } else {
            /* We are dealing with format #2. */
            foreach ($indices as $key =&gt; $val) {
                if ($GLOBALS['imp_search']-&gt;isSearchMbox($key)) {
                    $msgList += IMP::parseIndicesList($val);
                } else {
                    /* Make sure we don't have any duplicate keys. */
                    $msgList[$key] = is_array($val) ? array_unique($val) : array($val);
                }
            }
        }

&gt;
&gt; Some users complain about an error that appears when they reply an email:
&gt;
&gt; Fatal error: Unsupported operand types in
&gt; /usr/share/horde3/imp/lib/IMP.php on line 1143
&gt;
&gt; My guess is that the recursive call in the line 1143 sometimes return 
&gt; false and then the + operation fail:
&gt;
&gt;       } else {
&gt;             /* We are dealing with format #2. */
&gt;             foreach ($indices as $key =&gt; $val) {
&gt;                 if ($GLOBALS['imp_search']-&gt;isSearchMbox($key)) {
&gt;                     $res = IMP::parseIndicesList($val);
&gt;                     if ($res) $msgList += $res;
&gt;                 } else {
&gt;                     /* Make sure we don't have any duplicate keys. */
&gt;                     $msgList[$key] = is_array($val) ? 
&gt; array_unique($val) : array($val);
&gt;                 }
&gt;             }
&gt;         }
&gt;
&gt; I attach a patch.
&gt;
</description>
   <pubDate>Mon, 30 Jun 2008 05:16:55 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6994#t46980</link>
  </item>
  <item>
   <title>This had been fixed in CVS already.</title>
   <description>This had been fixed in CVS already.</description>
   <pubDate>Mon, 30 Jun 2008 05:49:20 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6994#t46981</link>
  </item>
  

 </channel>
</rss>
