diff --git a/reference/session/functions/session-unregister.xml b/reference/session/functions/session-unregister.xml index 5472d66024..a7ef26c0e7 100644 --- a/reference/session/functions/session-unregister.xml +++ b/reference/session/functions/session-unregister.xml @@ -1,5 +1,5 @@ - + @@ -28,7 +28,9 @@ If $_SESSION (or $HTTP_SESSION_VARS for PHP 4.0.6 or less) is used, use unset to unregister a session - variable. + variable. Do not unset $_SESSION + itself as this will disable the special function of the + $_SESSION superglobal. diff --git a/reference/session/functions/session-unset.xml b/reference/session/functions/session-unset.xml index 54e1ceb9c4..02ee27df9b 100644 --- a/reference/session/functions/session-unset.xml +++ b/reference/session/functions/session-unset.xml @@ -1,5 +1,5 @@ - + @@ -26,6 +26,16 @@ variable. i.e. $_SESSION = array(); + + + + Do NOT unset the whole $_SESSION with + unset($_SESSION) as this will disable the + registering of session variables through the + $_SESSION superglobal. + + + diff --git a/reference/session/reference.xml b/reference/session/reference.xml index 4de9e9fcae..a2330b2eed 100644 --- a/reference/session/reference.xml +++ b/reference/session/reference.xml @@ -1,5 +1,5 @@ - + Session handling functions Sessions @@ -200,6 +200,18 @@ unset($_SESSION['count']); ]]> + + + + + Do NOT unset the whole $_SESSION with + unset($_SESSION) as this will disable the + registering of session variables through the + $_SESSION superglobal. + + + + Unregistering a variable with <link