|
|
@@ -65,9 +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 remove index.php
|
|
|
+ // 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 = substr($cookie_dir, 0, -strlen(basename($cookie_dir)));
|
|
|
+ $cookie_dir = dirname($cookie_dir);
|
|
|
session_set_cookie_params($l, $cookie_dir, '', false, true);
|
|
|
}
|
|
|
|