The logic in ext/session/mod_user.c is just plain wrong.
http://us2.php.net/session_set_save_handler
Yet in ext/session/mod_user.c:
PS_FUNC(user) {
/* blah blah */
zval *retval = ps_call_handler(PSF(func), argc, argc);
if (retval) {
convert_to_long(retval);
return Z_LVAL_P(retval);
}
return FAILURE;
}
Remembering that SUCCESS == 0, and FAILURE == -1
So what does that mean for return values?
Change the FINISH macro in session.c to map true to SUCCESS, false to FAILURE, warn (and fail) for integer -1, and warn (but succeed) for anything else.
Either 5.next (5.7?) or phpng due to the age of this bug.
Voting Opened Jun 10, 2014 Voting Closes Jun 24, 2014