Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

New session fails to insert after restart or destroy #89

@bbtgp

Description

@bbtgp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions