> >> The second adjustment I made was in regards to an empty mailbox.
> >> The code for this was:
> >>
> >>   if (!isset($msort)) {
> >>       $msort = array();
> >>   }
> >>
> >> I put this in the showMessagesForMailbox function after the global
> >> declarations.
> 
> > Despite the fact that this is good programming practice in any case,
> > I'm curious why this one would have helped the sessions problems.
> > Huh...
> 
> I think it's something to do with auto-referencing of globals in
> sessions. Because somewhere in the code, $msort is added to the
> session array, but it's empty, then referenced without being passed
> around correctly, PHP 4.2.3 probably allowed for this to happen. And
> because of that, it's considered a bug.
> 
> Although saying that, I just tried the same fix for somebody over on
> irc, and they still get it... so I'm guessing there is a few like it.

As I said, it's good programming practice to make sure you know what's
in your variables, including explicitly setting arrays as empty and
whatnot, but the fact that php allowed for loosely (un)defined variable
usage and now their session mechanism seems to be breaking under those
circumstances says to me that either they didn't think through their
design choices or that they are attempting to stop supporting such
programming practices.  This hits projects like SquirrelMail hard, since
there could be any number of such variables all over the place.  You
could rightly call that sloppy programming, but then why support it in
the first place?  Argh...




-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to