Skip to content

Commit

Permalink
Minz slight change in session cookie path
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkarex committed Jul 30, 2015
1 parent f7190c3 commit 59daed3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Minz/Session.php
Expand Up @@ -66,7 +66,10 @@ public static function unset_session($force = false) {
*/
public static function keepCookie($l) {
// Get the script_name (e.g. /p/i/index.php) and keep only the path.
$cookie_dir = dirname(empty($_SERVER['REQUEST_URI']) ? '/' : dirname($_SERVER['REQUEST_URI']));
$cookie_dir = empty($_SERVER['REQUEST_URI']) ? '/' : $_SERVER['REQUEST_URI'];
if (substr($cookie_dir, -1) !== '/') {
$cookie_dir = dirname($cookie_dir) . '/';
}
session_set_cookie_params($l, $cookie_dir, '', false, false);
}

Expand Down

0 comments on commit 59daed3

Please sign in to comment.