cvs: phpdoc /en/reference/session reference.xml /en/reference/session/functions session-unregister.xml session-unset.xml
| From: | Derick Rethans | Date: | Mon, 19 May 2003 12:09:26 +0000 |
| Subject: | cvs: phpdoc /en/reference/session reference.xml /en/reference/session/functions session-unregister.xml session-unset.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969353650@lists.php.net to get a copy of this message | ||
derick Mon May 19 08:09:26 2003 EDT
Modified files:
/phpdoc/en/reference/session reference.xml
/phpdoc/en/reference/session/functions session-unregister.xml
session-unset.xml
Log:
- Add some warnings about using unset() on $_SESSION
Index: phpdoc/en/reference/session/reference.xml
diff -u phpdoc/en/reference/session/reference.xml:1.36
phpdoc/en/reference/session/reference.xml:1.37
--- phpdoc/en/reference/session/reference.xml:1.36 Fri May 16 12:10:00 2003
+++ phpdoc/en/reference/session/reference.xml Mon May 19 08:09:26 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.36 $ -->
+<!-- $Revision: 1.37 $ -->
<reference id="ref.session">
<title>Session handling functions</title>
<titleabbrev>Sessions</titleabbrev>
@@ -200,6 +200,18 @@
]]>
</programlisting>
</example>
+ </para>
+ <para>
+ <caution>
+ <para>
+ Do NOT unset the whole <varname>$_SESSION</varname> with
+ <literal>unset($_SESSION)</literal> as this will disable the
+ registering of session variables through the
+ <varname>$_SESSION</varname> superglobal.
+ </para>
+ </caution>
+ </para>
+ <para>
<example>
<title>
Unregistering a variable with <link
Index: phpdoc/en/reference/session/functions/session-unregister.xml
diff -u phpdoc/en/reference/session/functions/session-unregister.xml:1.4
phpdoc/en/reference/session/functions/session-unregister.xml:1.5
--- phpdoc/en/reference/session/functions/session-unregister.xml:1.4 Tue Dec 17 05:30:05 2002
+++ phpdoc/en/reference/session/functions/session-unregister.xml Mon May 19 08:09:26 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/session.xml, last change in rev 1.2 -->
<refentry id="function.session-unregister">
<refnamediv>
@@ -28,7 +28,9 @@
If <varname>$_SESSION</varname> (or
<varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is
used, use <function>unset</function> to unregister a session
- variable.
+ variable. Do not <function>unset</function>
<varname>$_SESSION</varname>
+ itself as this will disable the special function of the
+ <varname>$_SESSION</varname> superglobal.
</para>
</note>
<caution>
Index: phpdoc/en/reference/session/functions/session-unset.xml
diff -u phpdoc/en/reference/session/functions/session-unset.xml:1.3
phpdoc/en/reference/session/functions/session-unset.xml:1.4
--- phpdoc/en/reference/session/functions/session-unset.xml:1.3 Fri May 3 03:29:59 2002
+++ phpdoc/en/reference/session/functions/session-unset.xml Mon May 19 08:09:26 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/session.xml, last change in rev 1.8 -->
<refentry id="function.session-unset">
<refnamediv>
@@ -26,6 +26,16 @@
variable. i.e. $_SESSION = array();
</para>
</note>
+ <para>
+ <caution>
+ <para>
+ Do NOT unset the whole <varname>$_SESSION</varname> with
+ <literal>unset($_SESSION)</literal> as this will disable the
+ registering of session variables through the
+ <varname>$_SESSION</varname> superglobal.
+ </para>
+ </caution>
+ </para>
</refsect1>
</refentry>