[#6994] Fatal error in IMP::parseIndicesList method (Unsupported operand types)
Summary Fatal error in IMP::parseIndicesList method (Unsupported operand types)
Queue IMP
Queue Version 4.1.3
Type Bug
State Resolved
Priority 1. Low
Owners Jan Schneider <jan (at) horde (dot) org>
Requester asmarre (at) ull (dot) es
Created 06/30/2008 (69 days ago)
Due
Updated 06/30/2008 (69 days ago)
Assigned
Resolved 06/30/2008 (69 days ago)
Attachments imp_indices.diff Download
Milestone
Patch Yes

History
06/30/2008 Jan Schneider Comment #3
State ⇒ Resolved
Assigned to Jan Schneider
Reply to this comment
This had been fixed in CVS already.
06/30/2008 asmarre (at) ull (dot) es Comment #2 Reply to this comment

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 => $val) {
                 if ($GLOBALS['imp_search']->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);
                 }
             }
         }


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 => $val) {
                 if ($GLOBALS['imp_search']->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.
06/30/2008 asmarre (at) ull (dot) es Comment #1
New Attachment: imp_indices.diff Download
Patch ⇒ 1
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Fatal error in IMP::parseIndicesList method (Unsupported operand types)
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Reply to this comment

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 => $val) {
                 if ($GLOBALS['imp_search']->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.