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

use a session manager without calling employ() #96

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kgustine
Copy link
Contributor

Warning: array_shift() expects parameter 1 to be array, null given in EpiSession.php on line 58

If you initialize one, and only one, of the session implementations, you should not have to call employ().

Epi::init('session-apc');
getSession()->set('this','that');

that code would generate a warning because employ is called without an argument so it returns null. array_shift() is then called on $employ which causes the warning. I think this could be cleaned up more, but this is a quick fix.

Warning: array_shift() expects parameter 1 to be array, null given in EpiSession.php on line 58

If you initialize one, and only one, of the session implementations, you should not have to call employ().

Epi::init('session-apc');
getSession()->set('this','that');

that code would generate a warning because employ is called without an argument so it returns null. array_shift() is then called on $employ which causes the warning. I think this could be cleaned up more, but this is a quick fix.
Notice: Undefined index: EpiSession in EpiSession_Apc.php on line 48

$_COOKIE[EpiSession::COOKIE] is not available after setcookie() is called. It will only be available after the next page refresh. Therefore we need to set it manually to make it immediately available.
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.

2 participants