diff --git a/composer.json b/composer.json index bfa02d3..6e3852d 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "BaseSystems/framework", + "name": "codeigniter4/framework", "type": "project", "description": "The CodeIgniter framework v4", "homepage": "https://codeigniter.com", diff --git a/system/Session/Handlers/DatabaseHandler.php b/system/Session/Handlers/DatabaseHandler.php index 18da544..974fb87 100644 --- a/system/Session/Handlers/DatabaseHandler.php +++ b/system/Session/Handlers/DatabaseHandler.php @@ -172,11 +172,10 @@ $insertData = [ 'id' => $id, 'ip_address' => $this->ipAddress, - 'timestamp' => 'now()', 'data' => $this->platform === 'postgre' ? '\x' . bin2hex($data) : $data, ]; - if (! $this->db->table($this->table)->insert($insertData)) { + if (! $this->db->table($this->table)->set('timestamp', 'now()', false)->insert($insertData)) { return $this->fail(); } @@ -192,13 +191,13 @@ $builder = $builder->where('ip_address', $this->ipAddress); } - $updateData = ['timestamp' => 'now()']; + $updateData = []; if ($this->fingerprint !== md5($data)) { $updateData['data'] = ($this->platform === 'postgre') ? '\x' . bin2hex($data) : $data; } - if (! $builder->update($updateData)) { + if (! $builder->set('timestamp', 'now()', false)->update($updateData)) { return $this->fail(); }