diff options
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php index e8805d8f4..ec39cefad 100644 --- a/lib/util.php +++ b/lib/util.php @@ -600,7 +600,7 @@ function common_forgetme() { function common_current_user() { if (isset($_REQUEST[session_name()]) || (isset($_SESSION['userid']) && $_SESSION['userid'])) { common_ensure_session(); - $id = $_SESSION['userid']; + $id = isset($_SESSION['userid']) ? $_SESSION['userid'] : false; if ($id) { # note: this should cache $user = User::staticGet($id); |