mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
2d9885c8cb
According to the documentation, returning TRUE from user based session handlers should indicate success, while returning FALSE should indicate failure. The existing logic relied on casting the return value to an integer and returning that from the function. However, the internal handlers use SUCCESS/FAILURE where SUCCESS == 0, and FAILURE == -1, so the following behavior map occurs: return false; => return 0; => return SUCCESS return true; => return 1; => return <undefined> Since the session API checks against FAILURE, both boolean responses wind up appearing like "not FAILURE". This diff reasserts boolean responses to behave as documented and introduces some special handling for integer responses of 0 and -1 so that code can be written for older and newer versions of PHP. |
||
---|---|---|
.. | ||
tests | ||
config.m4 | ||
config.w32 | ||
CREDITS | ||
mod_files.bat | ||
mod_files.c | ||
mod_files.h | ||
mod_files.sh | ||
mod_mm.c | ||
mod_mm.h | ||
mod_user_class.c | ||
mod_user.c | ||
mod_user.h | ||
package.xml | ||
php_session.h | ||
session.c |