[imp] imp_get_vinfo bug and fix ?

Andrew Morgan morgan at orst.edu
Mon Sep 22 12:47:36 PDT 2003



On Mon, 22 Sep 2003, Jan Schneider wrote:

> Zitat von Andrew Morgan <morgan at orst.edu>:
> > Okay, I guess I don't understand how it ever worked!  :P
>
> Because of:
> $GLOBALS['imp'] = &$_SESSION['imp'];
> in several places.
>
> > I'll leave it to someone that knows this code to figure out the proper
> > fix.  For now, I've changed the code in my vinfo hook to use
> > $_SESSION['imp']['user'] instead of $imp['user'].
>
> This is hook and hence only an example. You have to put there anything that
> matches your needs. But agreed that this is example won't work in any case,
> so it's fixed now in CVS.
>
> Jan.

Thanks Jan.  My quick check of the other places using $imp['user'] shows
that they already work.  In the previous stable release of IMP, there was
code "$imp = &$_SESSION['imp']" before the call to the vinfo hook.  That
was removed, I guess to move toward the superglobal stuff in php.  Fixing
the example is probably all that is needed though.

	Andy



More information about the imp mailing list