Welcome Guest, Not a member yet? Register   Sign In
Object of type CodeIgniter\Session\Session is not callable
#3

(This post was last modified: 04-27-2023, 03:42 AM by donpwinston.)

(04-26-2023, 03:48 PM)kenjis Wrote: Yes, CodeIgniter\Session\Session is not callable.
What is the $session ?

I passed it as a variable in a view function in a controller:

PHP Code:
print view('header', [
 
'current' => 'register',
 
'title' => 'BNC New User Agreement',
 
'meta_desc' => 'Register here for electronic bankruptcy noticing or to establish a preferred address!',
 
'session' => $this->session,
 ]); 

I fixed it by not doing that and used the session('logged_in') function in my view instead. Probably a better way to do it anyway. I have another application where I do the same thing and it does not give me this "session is not callable" error. I don't know what is different, both are using 4.3.3.
Simpler is always better
Reply


Messages In This Thread
RE: Object of type CodeIgniter\Session\Session is not callable - by donpwinston - 04-27-2023, 03:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB