Skip registering session handlers when session already exists

.. for a specific use case when I want to create additional rcube_session object
for discrete operations on another session.
pull/6540/head
Aleksander Machniak 6 years ago
parent 6d19d1466e
commit edd9c31d6c

@ -102,6 +102,11 @@ abstract class rcube_session
*/ */
public function register_session_handler() public function register_session_handler()
{ {
if (session_id()) {
// Session already exists, skip
return;
}
ini_set('session.serialize_handler', 'php'); ini_set('session.serialize_handler', 'php');
// set custom functions for PHP session management // set custom functions for PHP session management

Loading…
Cancel
Save