Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New session fails to insert after restart or destroy #89

Open
bbtgp opened this issue Dec 29, 2014 · 0 comments
Open

New session fails to insert after restart or destroy #89

bbtgp opened this issue Dec 29, 2014 · 0 comments

Comments

@bbtgp
Copy link

bbtgp commented Dec 29, 2014

I was having an issue adding session data to the database after deleting the current session (using $session->restart()). My session was removed but $this->_update_id was not set to NULL to allow inserting of a new session. The result is function _write issues an update query for a non existent session row.

I solved my issue by adding a line of code in database/classes/Kohana/Session/Database.php after

// Delete the cookie
Cookie::delete($this->_name);
//New line
$this->_update_id = NULL;

in _destroy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant