php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78624 session_gc always returns FALSE for user defined handlers
Submitted: 2019-10-02 23:25 UTC Modified: -
From: bshafs at gmail dot com Assigned:
Status: Closed Package: Session related
PHP Version: 7.2.23 OS: OSX
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bshafs at gmail dot com
New email:
PHP Version: OS:

 

 [2019-10-02 23:25 UTC] bshafs at gmail dot com
Description:
------------
The function "session_gc()" ALWAYS returns false for user-defined session handlers. 


Test script:
---------------
https://gist.github.com/bshaffer/31d6e1c9efc369a27fa5bf7be61e9f4c

Expected result:
----------------
When an int or "true" is returned from the "gc" method of the user-defined session handler, "session_gc()" should return an int representing the number of deleted records  (or "1" when true is returned).

Actual result:
--------------
The method "session_gc()" returns false regaredless of what is returned by the "gc" method.

Patches

151203849618 (last revision 2019-10-02 23:25 UTC by bshafs at gmail dot com)

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-10-02 23:25 UTC] bshafs at gmail dot com
The following patch has been added/updated:

Patch Name: 151203849618
Revision:   1570058732
URL:        https://bugs.php.net/patch-display.php?bug=78624&patch=151203849618&revision=1570058732
 [2019-10-02 23:59 UTC] bshafs at gmail dot com
The following pull request has been associated:

Patch Name: fix #78624: session_gc return value for user defined session handlers
On GitHub:  https://github.com/php/php-src/pull/4775
Patch:      https://github.com/php/php-src/pull/4775.patch
 [2019-10-04 04:16 UTC] krakjoe@php.net
Automatic comment on behalf of betterbrent@google.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a6d219630c4128a124f3d9a2e7ca97afb92d5d47
Log: fix #78624: session_gc return value for user defined session handlers
 [2019-10-04 04:16 UTC] krakjoe@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC