Skip to content

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