Commit 0b347f3a authored by drumm's avatar drumm
Browse files

#93945 by chx. Save sessions before objects are destroyed on some configurations.

parent 77a72824
......@@ -17,6 +17,11 @@ function sess_close() {
function sess_read($key) {
global $user;
// Write and Close handlers are called after destructing objects since PHP 5.0.5
// Thus destructors can use sessions but session handler can't use objects.
// So we are moving session closure before destructing objects.
// Handle the case of first time visitors and clients that don't store cookies (eg. web crawlers).
if (!isset($_COOKIE[session_name()])) {
$user = drupal_anonymous_user();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment