php-src/ext/session
nielsdos da3ce6015d Propagate errors correctly in ps_files_cleanup_dir()
In SessionHandler::gc, we use a virtual call to PS(default_mod)->s_gc to
call the gc implementation. That return value is checked against
FAILURE (-1).
One of the call targets of PS(default_mod)->s_gc is ps_gc_files().
ps_gc_files() calls to ps_files_cleanup_dir(). The latter function has
some error checks and outputs a notice if something goes wrong. In cases
of errors, the function returns 0. This means that the check in
SessionHandler::gc will misinterpret this as a success and report that 0
files have been *successfully* cleaned up. Fix it by returning -1 to
indicate something *did* go wrong.

Closes GH-10644.
2023-02-21 16:09:22 +00:00
..
tests Fix GH-9932: Discards further characters for session name. 2022-11-15 12:27:44 +00:00
config.m4 Fixed bug #80377 2020-11-25 11:47:05 +01:00
config.w32 Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
CREDITS
mod_files.bat Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
mod_files.c Propagate errors correctly in ps_files_cleanup_dir() 2023-02-21 16:09:22 +00:00
mod_files.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
mod_files.sh Make ext/session/mod_files.sh executable 2018-09-26 06:11:13 +02:00
mod_mm.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
mod_mm.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
mod_user_class.c Promote "Session is not active" warning to exception 2021-05-27 23:26:15 +02:00
mod_user.c Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
mod_user.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_session.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
session_arginfo.h Generate optimizer func info from stubs for a few extensions - part 2 (#7401) 2021-08-25 15:29:46 +02:00
session.c Fix GH-9932: Discards further characters for session name. 2022-11-15 12:27:44 +00:00
session.stub.php Generate optimizer func info from stubs for a few extensions - part 2 (#7401) 2021-08-25 15:29:46 +02:00