php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73273 session_unset() empties values from all variables in which is $_session stored
Submitted: 2016-10-09 13:28 UTC Modified: 2016-10-10 10:05 UTC
From: ghostovice at gmail dot com Assigned: nikic
Status: Closed Package: Session related
PHP Version: 7.0.11 OS: Linux Mint 18
Private report: No CVE-ID:
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ghostovice at gmail dot com
New email:
PHP Version: OS:

 

 [2016-10-09 13:28 UTC] 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
(
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-09 17:54 UTC] yohgaki@php.net
-Status: Open +Status: Not a bug
 [2016-10-09 17:54 UTC] yohgaki@php.net
This is what it suppose to do.

http://php.net/manual/en/function.session-unset.php
 [2016-10-10 10:05 UTC] nikic@php.net
-Status: Not a bug +Status: Assigned -Assigned To: +Assigned To: nikic
 [2016-10-10 10:21 UTC] nikic@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c91f652ddbca784d9fc0c25fb2015923c6aca438
Log: Fixed bug #73273
 [2016-10-10 10:21 UTC] nikic@php.net
-Status: Assigned +Status: Closed
 [2016-10-17 10:07 UTC] bwoebi@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c91f652ddbca784d9fc0c25fb2015923c6aca438
Log: Fixed bug #73273
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Tue Aug 29 15:01:52 2017 UTC