[svn r15219] api_session_unregister function changed

http://www.php.net/session_unregister.
"This function does not unset the corresponding global variable for name , it only prevents the variable from being saved as part of the session. You must call unset()  to remove the corresponding global variable."
skala
Julio Montoya 18 years ago
parent 8edc359d67
commit b6b241d386
  1. 10
      main/inc/lib/main_api.lib.php

@ -754,12 +754,16 @@ function api_session_register($variable)
*/
function api_session_unregister($variable)
{
if(isset($GLOBALS[$variable]))
{
unset ($GLOBALS[$variable]);
}
if(isset($_SESSION[$variable]))
{
session_unregister($variable);
$_SESSION[$variable] = null;
}
unset ($GLOBALS[$variable]);
session_unregister($variable);
}
}
/**
* Clear the session

Loading…
Cancel
Save