Summary | Searching for unseen messages doesn't work: Undefined index: unseen |
Queue | IMP |
Queue Version | 4.3 |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | |
Requester | amg1127 (at) cefetrs (dot) tche (dot) br |
Created | 10/28/2008 (6065 days ago) |
Due | |
Updated | 04/30/2009 (5881 days ago) |
Assigned | 11/06/2008 (6056 days ago) |
Resolved | 12/03/2008 (6029 days ago) |
Milestone | |
Patch | No |
http://cvs.horde.org/co.php/imp/search.php?r=2.128.2.33
I don't see the bug in IMP 4.3.4.
New Attachment: horde-config.tar.bz2
integer. See line 938 of imp/lib/Search.php:
$ob->size(intval($search['text'][$key]), ($val == 'size_larger') ?
'>' : '<');
My headache occurs because I still can't look for unseen messages
without enabling compression in Horde.
Please, try to reproduce the searching bug using my configuration
(attached). You will need a MySQL server and a GMail account with IMAP
enabled.
State ⇒ Not A Bug
integer. See line 938 of imp/lib/Search.php:
$ob->size(intval($search['text'][$key]), ($val == 'size_larger') ? '>' : '<');
that code since 4.3.0.
in a new Horde+IMP installation.
In order to reproduce the bug, I think it's enough adding these lines
at end of horde/config/conf.php:
$conf['compress_pages'] = false;
$conf['debug_level'] = E_ALL;
--------------
I investigated the source code... In imp/search.php, line 73, it tries
to find integer search fields, in order to convert sizes from
kilobytes to bytes. When an user specifies he wants to find unseen
messages, the browser generates a field with value "unseen" in
$search['field'][$i]. $imp_search_fields receives an array from
$imp_search->searchFields(), that is defined in imp/lib/Search.php at
line 702. The problem occurs because the returned array doesn't define
the index 'unseen'.
I wish to do some suggestions:
# Track PHP errors with set_error_handler()
(http://br.php.net/manual/en/function.set-error-handler.php), so Horde
can optionally log errors in logfile or display PHP errors, even if
there is an output handler capturing output.
# In imp/search.php, line 74, IMP shouldn't assume user input is a
valid integer. By example, IMP should throw an error if an user tries
to search messages with "size >= k1024abc"...
State ⇒ Feedback
that code since 4.3.0.
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Searching for unseen messages doesn't work: Undefined index: unseen
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Notice: Undefined index: unseen in /var/www/horde33/imp/search.php on line 73
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/horde33/imp/search.php:73) in
/var/www/horde33/imp/search.php on line 96