Re: [Phplib-users] Sess4 globals off (FIX) I think
Brought to you by:
nhruby,
richardarcher
From: Giancarlo <gia...@na...> - 2002-10-16 13:37:02
|
Il 17:09, mercoled=EC 16 ottobre 2002, li...@ye... ha scritto: > It seems replacing freeze() in session4.inc with the following code > overcomes the problem I have been experiencing. > > I haven't had chance to do more testing but just replacing the code wit= h > that below seems to make the test pages with the distro behave properly= for > me. > > ------------------------------ > function freeze() { > // If register_globals is off -> store session variables values > if(!(bool) ini_get('register_globals')) { > reset($_SESSION); So is this reset($_SESSION) that php 4.1.2 wants? Or is it the while(list... insteasd of 'foreach( ? Thanks a lot anyway, we found something Gian > while(list($key,) =3D each($_SESSION)) > { > global $$key; > eval("\$_SESSION[\$key]=3D \$$key;"); > } > } > } |