The error is caused by a controller I call from cli. I have read in the docs that session stops immediately when cli is used and inside the BaseController I check if exists session(‘character_id’).
How can I solve this, can I check inside the base controller if a call is from cli?
Ok I think I can use: if ($this->input->is_cli_request()) {