Welcome Guest, Not a member yet? Register   Sign In
How to tell if session loaded?
#4

I don't believe the $_SESSION variable is available until the session has been initiated, IIRC. So you could do isset($_SESSION).

Or you could not worry about checking, since as long as you use the session() helper method, it will be automatically started on the first use. Trying to grab a variable like with $key = session('some_key') will ensure the session is started before grabbing the value.
Reply


Messages In This Thread
How to tell if session loaded? - by skunkbad - 09-15-2018, 10:36 AM
RE: How to tell if session loaded? - by kilishan - 09-16-2018, 11:44 AM
RE: How to tell if session loaded? - by skunkbad - 09-16-2018, 01:50 PM
RE: How to tell if session loaded? - by kilishan - 09-16-2018, 02:43 PM
RE: How to tell if session loaded? - by skunkbad - 09-16-2018, 10:09 PM
RE: How to tell if session loaded? - by InsiteFX - 09-17-2018, 04:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB