-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them
Description
PHP Version
8.2
CodeIgniter4 Version
4.6
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter)
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
MySQL 8
What happened?
When using the bulk method for setting session tempdata setTempdata($array, NULL, $time), the session data does not expire as expected after the specified time. However, when using the individual key-value method setTempdata($key, $value, $time), the expiration works correctly.
Steps to Reproduce
$data = ['key1' => 'value1'];
$session->setTempdata($data, NULL, 5);
$session->setTempdata('key2','value2',5);
Expected Output
From __ci_vars in $_SESSION, should be (expires in 5 seconds):
[key1] => 1745158235
[key2] => 1745158235
But it comes out as:
[key1] => 3490316465 (55 years in the future)
[key2] => 1745158235 (correct value)
Anything else?
Testing on PHP 8.3.15 + Linux also have the same issue.
Metadata
Metadata
Assignees
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them