Bug #79587 [Opn->Nab]: SessionHandler::destroy() works only once

From: Date: Tue, 12 May 2020 14:45:40 +0000
Subject: Bug #79587 [Opn->Nab]: SessionHandler::destroy() works only once
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227015@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79587&edit=1

 ID:                 79587
 Updated by:         cmb@php.net
 Reported by:        sharkykz at gmail dot com
 Summary:            SessionHandler::destroy() works only once
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Session related
 Operating System:   Any
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

From the PHP manual[1]:

| Please note the callback methods of this class are designed to
| be called internally by PHP and are not meant to be called from
| user-space code. The return values are equally processed
| internally by PHP.

[1] <https://www.php.net/SessionHandler>


Previous Comments:
------------------------------------------------------------------------
[2020-05-11 16:12:30] sharkykz at gmail dot com

Description:
------------
Calling SessionHandler::destroy() multiple times destroys only first session.

Test script:
---------------
// Basic setup.
$handler = new \SessionHandler;
session_set_save_handler($handler);
session_start();

// Array of session IDs.
$sessionsToDestroy = array(
	'sessionId1',
	'sessionId2',
	'sessionId3',
);

// Attempt to destroy the sessions.
foreach ($sessionsToDestroy as $sessionId)
{
	$handler->destroy($sessionId);
}

Expected result:
----------------
All passed sessions destroyed.

Actual result:
--------------
Only the first session is destroyed.


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



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


Thread (2 messages)

« previous php.bugs (#227015) next »