diff options
author | Bish Erbas <42714627+bisherbas@users.noreply.github.com> | 2018-10-31 09:09:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-31 09:09:35 -0400 |
commit | f6380409ac0b6ae1368d89ca749c139183e7b02e (patch) | |
tree | 6cb00ddfc70b93b99ad2b12a0490e21cb8f3f6b1 /index.php | |
parent | a605982fa9b9a638c801c9d6dd712d9fca6af60d (diff) | |
download | Shaarli-f6380409ac0b6ae1368d89ca749c139183e7b02e.tar.gz Shaarli-f6380409ac0b6ae1368d89ca749c139183e7b02e.tar.zst Shaarli-f6380409ac0b6ae1368d89ca749c139183e7b02e.zip |
Update session start condition
Recommended method for PHP >= 5.4.0 as seen here https://stackoverflow.com/questions/6249707/check-if-php-session-has-already-started
Per https://shaarli.readthedocs.io/en/master/Server-configuration/ Shaarli supports PHP >= 5.6
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -111,7 +111,7 @@ ini_set('session.use_trans_sid', false); | |||
111 | 111 | ||
112 | session_name('shaarli'); | 112 | session_name('shaarli'); |
113 | // Start session if needed (Some server auto-start sessions). | 113 | // Start session if needed (Some server auto-start sessions). |
114 | if (session_id() == '') { | 114 | if (session_status() == PHP_SESSION_NONE) { |
115 | session_start(); | 115 | session_start(); |
116 | } | 116 | } |
117 | 117 | ||