- Add some warnings about using unset() on $_SESSION

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@127715 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Derick Rethans 2003-05-19 12:09:26 +00:00
parent 21c3cd0442
commit a88e30e347
3 changed files with 28 additions and 4 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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 @@ unset($_SESSION['count']);
]]>
</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