Update of /cvsroot/phplib/php-lib-stable/php
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19732
Modified Files:
session4.inc
Log Message:
in freeze function: save global variable into $_SESSION only if the global variable is set. Useful when you set a variable directly in $_SESSION on your page (maybe with 3rd party librairies like saja), and not using $sess->register(), because when you call page_close(), the $_SESSION variable you did set is overwritten with an empty value.
Index: session4.inc
===================================================================
RCS file: /cvsroot/phplib/php-lib-stable/php/session4.inc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** session4.inc 12 Jan 2007 21:47:27 -0000 1.6
--- session4.inc 14 Apr 2007 22:49:27 -0000 1.7
***************
*** 558,562 ****
// foreach ($_SESSION as $key => $value) {
global $$key;
! eval("\$_SESSION[\$key]= \$$key;");
}
}
--- 558,564 ----
// foreach ($_SESSION as $key => $value) {
global $$key;
!
! if(isset($$key))
! eval("\$_SESSION[\$key]= \$$key;");
}
}
|