aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Session.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre.alapetite@alexandra.dk> 2015-07-30 23:43:00 +0200
committerGravatar Alexandre Alapetite <alexandre.alapetite@alexandra.dk> 2015-07-30 23:43:00 +0200
commit27b93e9a9f7002ddb4ce30d4a9ee626e44c8037f (patch)
treefce9e030ca193b93c69aaa172ac47c1b22e7c201 /lib/Minz/Session.php
parent2f2facac300b95021406085d5d1701e001a0af65 (diff)
parentf7190c34e1a1ea36bbc81a7dea8dcb7a39cea7cf (diff)
Merge remote-tracking branch 'origin/MinzSessionCookie' into dev
Diffstat (limited to 'lib/Minz/Session.php')
-rw-r--r--lib/Minz/Session.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Minz/Session.php b/lib/Minz/Session.php
index 058685ada..14a093bf7 100644
--- a/lib/Minz/Session.php
+++ b/lib/Minz/Session.php
@@ -65,10 +65,9 @@ class Minz_Session {
* @param $l la durée de vie
*/
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);
- session_set_cookie_params($l, $cookie_dir, '', false, true);
+ // 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']));
+ session_set_cookie_params($l, $cookie_dir, '', false, false);
}