-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Description
Description
The following code:
Lines 515 to 522 in 21e01f3
if (PS(lazy_write) && PS(session_vars) | |
&& PS(mod)->s_update_timestamp | |
&& PS(mod)->s_update_timestamp != php_session_update_timestamp | |
&& zend_string_equals(val, PS(session_vars)) | |
) { | |
ret = PS(mod)->s_update_timestamp(&PS(mod_data), PS(id), val, PS(gc_maxlifetime)); | |
handler_function_name = handler_class_name != NULL ? "updateTimestamp" : "update_timestamp"; | |
} else { |
Will not call updateTimestamp unless PS(mod)->s_update_timestamp exists & is different to the inbuilt updateTimestamp function (php_session_update_timestamp defined in
Line 1105 in 21e01f3
PHPAPI zend_result php_session_update_timestamp(PS_UPDATE_TIMESTAMP_ARGS) { |
Given that session.lazy_write defaults to 1 --> True, the expectation is that the session file will not be overwritten if there isn't a change in session value. But this will always happen unless there is a defined custom handler.
PHP Version
PHP 8.2
Operating System
Ubuntu 22.04 LTS