aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php9
-rw-r--r--include/user.inc.php5
2 files changed, 13 insertions, 1 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index bcbab6ad1..5296288ae 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -1621,6 +1621,10 @@ function get_branch_from_version($version)
*/
function get_device()
{
+ if (session_id() == '')
+ {
+ session_start();
+ }
$device = pwg_get_session_var('device');
if (is_null($device))
@@ -1657,6 +1661,11 @@ function mobile_theme()
return false;
}
+ if (session_id() == '')
+ {
+ session_start();
+ }
+
if (isset($_GET['mobile']))
{
$is_mobile_theme = get_boolean($_GET['mobile']);
diff --git a/include/user.inc.php b/include/user.inc.php
index 0ff89c950..69d6af692 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -26,7 +26,10 @@ $user['id'] = $conf['guest_id'];
if (isset($_COOKIE[session_name()]))
{
- session_start();
+ if (session_id() == '')
+ {
+ session_start();
+ }
if (isset($_GET['act']) and $_GET['act'] == 'logout')
{ // logout
logout_user();