Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only use of helper(array) on Session::get() instead of Session::__construct #1544

Closed

Conversation

samsonasik
Copy link
Member

helper('array'); on Session class only used in get() method. So, moved the helper('array') usage to Session::get() method.

Checklist:

  • Securely signed commits

@natanfelles
Copy link
Contributor

While in the constructor, the helper function is called only once. In the get() will be called several times. I do not think it's a good change.

@samsonasik
Copy link
Member Author

in other classes, use of helper is only when the helper functions will be called, it mostly for consistency

@lonnieezell
Copy link
Member

While consistency is a good thing, in this case, I think it should stay in the constructor because @natanfelles is correct that we'll see it called a lot more than needed, and include_once is never the fastest command.

@samsonasik samsonasik deleted the sessin-array-helper-usage branch November 27, 2018 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants