Sort bug (again)

Eugene Miretsky eugene@invision.net
Wed, 29 Nov 2000 12:18:22 -0500


Hello,

Quite some time ago, I posted a question on this list regarding 
the following warning message;

  Warning: Undefined offset: <some number> in .../horde/imp/mailbox.php3 on line
373

I found that this warning occurs whenever the field that the messages 
are being sorted on is empty (i.e. sorting messages by subject,
with some messages having empty subject).

I'm using Courier imap, php 4.0.1pl2, and imp 2.2, qmail
Unfortunatelly, nobody was able to reproduce this problem
(but I got complaints from my users about the same issue).

The simplest way to eliminate this warning is to change line 373 in
mailbox.php3 
  from: $msgnum = $sorted[$i-1];
  to  : $msgnum = @$sorted[$i-1];

I was wandering if this fix can be applied to imp distribution.

-- 
  Eugene Miretskiy <eugene@invision.net>
  InVision.com, INC.  (631) 543-1000
  www.invision.net  /  www.longisland.com