When a user session is not found in the sessions table, you get this error message:

Notice: Trying to get property of non-object in D:\php\drupal\includes\session.inc on line 44

The problem is in line 44:

$user = drupal_anonymous_user($user->session);

In this case there's no record available in the sessions table, so $user->session is not properly set.
You can easily reproduce this error by emptying the sessions table and accessing your site.
I fixed this bug on my site replacing the above line with the following:

$session = ($user ? $user->session : session_id());
$user = drupal_anonymous_user($session);
CommentFileSizeAuthor
session.inc.patch_4.txt616 bytesstefano73

Comments

profix898’s picture

Status: Active » Closed (duplicate)

Thanks. Issue will be fixed in http://drupal.org/node/91046