Input::getSessionStore() throws an exception #227

Closed
Zizaco opened this Issue Feb 1, 2013 · 0 comments

Projects

None yet

2 participants

@Zizaco
Zizaco commented Feb 1, 2013

As we can see here: laravel-ardent/ardent#3

This becomes a problem when you need to check if the SessionStore is already initialized. The only way to check it "without throwing an exception" is to silently catch it up, which does not seems to be the right thing to do.

Maybe getSessionStore() should simply return null when the session is not set and the exception throw be placed at https://github.com/laravel/framework/blob/master/src/Illuminate/Http/Request.php#L272 (the only place where getSessionStore() is called) if the result is null.

Right now getSessionStore() is not usable to check what it was suposse to check I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment