Bug #73273 [Asn->Csd]: session_unset() empties values from all variables in which is $_session stored

From: Date: Mon, 10 Oct 2016 10:21:47 +0000
Subject: Bug #73273 [Asn->Csd]: session_unset() empties values from all variables in which is $_session stored
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204577@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73273&edit=1

 ID:                 73273
 Updated by:         nikic@php.net
 Reported by:        ghostovice at gmail dot com
 Summary:            session_unset() empties values from all variables in
                     which is $_session stored
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Session related
 Operating System:   Linux Mint 18
 PHP Version:        7.0.11
 Assigned To:        nikic
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c91f652ddbca784d9fc0c25fb2015923c6aca438
Log: Fixed bug #73273


Previous Comments:
------------------------------------------------------------------------
[2016-10-09 17:54:02] yohgaki@php.net

This is what it suppose to do.

http://php.net/manual/en/function.session-unset.php

------------------------------------------------------------------------
[2016-10-09 13:28:50] ghostovice at gmail dot com

Description:
------------
session_unset() empties values from all variables in which is $_session stored

Test script:
---------------
<?php
    session_start();
    $_SESSION['test'] = true;
    $var = $_SESSION;
    session_unset();
    print_r($var);

Expected result:
----------------
Array
(
    [test] => 1
)

Actual result:
--------------
Array
(
)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=73273&edit=1


Thread (4 messages)

« previous php.bugs (#204577) next »