Closed (duplicate)
Project:
Drupal core
Version:
x.y.z
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2006 at 13:15 UTC
Updated:
24 Oct 2006 at 16:46 UTC
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);
| Comment | File | Size | Author |
|---|---|---|---|
| session.inc.patch_4.txt | 616 bytes | stefano73 |
Comments
Comment #1
profix898 commentedThanks. Issue will be fixed in http://drupal.org/node/91046