Summary | IMP_Search::listQueries() doesn't check for empty array |
Queue | IMP |
Queue Version | 4.1.2 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | manuel (at) mausz (dot) at |
Created | 07/14/2006 (7036 days ago) |
Due | |
Updated | 07/14/2006 (7036 days ago) |
Assigned | 07/14/2006 (7036 days ago) |
Resolved | 07/14/2006 (7036 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
State ⇒ Assigned
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ IMP_Search::listQueries() doesn't check for empty array
Queue ⇒ IMP
the "Server and Folder Information"-settings.
PHP Warning:
Warning: Invalid argument supplied for foreach() in
/path/to/imp/lib/Search.php on line 478
Simple Patch:
--- lib/Search.php.orig Fri Jul 14 13:30:32 2006
+++ lib/Search.php Fri Jul 14 13:31:21 2006
@@ -475,6 +475,10 @@
{
$vfolders = array();
+ if (empty($_SESSION['imp']['search']['q'])) {
+ return $vfolders;
+ }
+
foreach ($_SESSION['imp']['search']['q'] as $key => $val) {
if (!$vfolder || !empty($val['vfolder'])) {
$vfolders[$key] = $this->getLabel($key);
Regards,
/ manuel