diff --git a/libraries/joomla/session/handler/joomla.php b/libraries/joomla/session/handler/joomla.php index d5486e63b2906..f1e6434e821d0 100644 --- a/libraries/joomla/session/handler/joomla.php +++ b/libraries/joomla/session/handler/joomla.php @@ -42,13 +42,6 @@ class JSessionHandlerJoomla extends JSessionHandlerNative */ public function __construct($options = array()) { - // Disable transparent sid support - ini_set('session.use_trans_sid', '0'); - - // Only allow the session ID to come from cookies and nothing else. - ini_set('session.use_only_cookies', '1'); - - // Set options $this->setOptions($options); $this->setCookieParams(); } @@ -79,6 +72,16 @@ public function start() } } + // Only allow session config to be changed if no session yet started to avoid warnings + if ($this->getId() === "") + { + // Disable transparent sid support + ini_set('session.use_trans_sid', '0'); + + // Only allow the session ID to come from cookies and nothing else. + ini_set('session.use_only_cookies', '1'); + } + return parent::start(); }