diff options
| author | 2015-09-12 18:15:46 +0200 | |
|---|---|---|
| committer | 2015-09-12 18:15:46 +0200 | |
| commit | 133e369afff02e5984fe4ce5109e33fd2fbccfc7 (patch) | |
| tree | 445feb4bf7631f7f10d1d715dab297afca3cc65c /lib/Minz/Session.php | |
| parent | f148e3938cc8daaaef1c71853594fbe142a1329e (diff) | |
| parent | 0204e8ff08ba9ae103c46d08484cf30aedfb9148 (diff) | |
Version 1.1.3-beta1.1.3-beta
Diffstat (limited to 'lib/Minz/Session.php')
| -rw-r--r-- | lib/Minz/Session.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Minz/Session.php b/lib/Minz/Session.php index 058685ada..057e7746a 100644 --- a/lib/Minz/Session.php +++ b/lib/Minz/Session.php @@ -66,8 +66,10 @@ class Minz_Session { */ public static function keepCookie($l) { // Get the script_name (e.g. /p/i/index.php) and keep only the path. - $cookie_dir = empty($_SERVER['SCRIPT_NAME']) ? '' : $_SERVER['SCRIPT_NAME']; - $cookie_dir = dirname($cookie_dir); + $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, true); } |
