codeguy/Slim — Issue #219: Slim_Middleware_SessionCookie problem ?
Author: imknight
Created: 2012-01-10 05:41:07+00:00
State: open

it seem like it will create 2 cookie with 2 different path , one is the root path and another one is route path.

example my url is domain.com/account/

it will create 2 cookie with path "/" and path "/account"

this causing error for decodeSecureCookie because the first param is expected to be a string, in stead of array.

[10-Jan-2012 13:24:15] PHP Fatal error: Uncaught exception 'ErrorException' with message 'explode() expects parameter 2 to be string, array given' in /Users/knight/Dev/web/tuts/Slim/Http/Util.php:210
Stack trace:
#0 [internal function]: Slim::handleErrors(2, 'explode() expec...', '/Users/knight/D...', 210, Array)
#1 /Users/knight/Dev/web/tuts/Slim/Http/Util.php(210): explode('|', Array)
#2 /Users/knight/Dev/web/tuts/Slim/Middleware/SessionCookie.php(118): Slim_Http_Util::decodeSecureCookie(Array, 'CHANGE_ME', 0, 0)
#3 /Users/knight/Dev/web/tuts/Slim/Middleware/SessionCookie.php(101): Slim_Middleware_SessionCookie->loadSession(Array)
#4 /Users/knight/Dev/web/tuts/Slim/Slim.php(1148): Slim_Middleware_SessionCookie->call(Array)
#5 /Users/knight/Dev/web/tuts/tuts/index.php(43): Slim->run()
#6 {main}
thrown in /Users/knight/Dev/web/tuts/Slim/Http/Util.php on line 210