Summary | undefined index error in IMP.php, line 585 |
Queue | IMP |
Queue Version | 4.0.2 |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | |
Requester | eli (at) experthost (dot) com |
Created | 03/25/2005 (7397 days ago) |
Due | |
Updated | 03/25/2005 (7397 days ago) |
Assigned | |
Resolved | 03/25/2005 (7397 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
showing the mailbox in the list is pointless), !isset($filter[0]) will
return true and you will be setting $showmbox incorrectly and doing an
array_shift() on an empty array.
However, is my fix not a better one? using !isset($filter[0]) takes
in to consideration that $filter could be entirely empty, or that
$filter[0] is empty (null, or o, or false), whereas adding
count($filter) requires $filter to have an item in it, and you're
running 2 functions rather than just 1.
State ⇒ Not A Bug
Bug #1367.State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ undefined index error in IMP.php, line 585
Queue ⇒ IMP
the line using "is_null($filter[0])":
/* Add the list of mailboxes to the lists. */
$showmbox = false;
if (is_null($filter[0])) {
$showmbox = true;
array_shift($filter);
}
If you change the is_null() call to !isset() you eliminate the
undefined index error and get the same functionality.
Eli.