From 2e02ac23be9ba3a0b06fe7fef3adb0d370fb9278 Mon Sep 17 00:00:00 2001 From: Bruce Allen Date: Wed, 11 May 2005 12:24:05 +0000 Subject: [PATCH] Deal with error case that occurs in PHP logs svn path=/trunk/boinc/; revision=6124 --- checkin_notes | 1 + html/inc/db_forum.inc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 804e85018f..ef7ec9b914 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6422,6 +6422,7 @@ Bruce 11 May 2005 util.inc prefs.inc forum_show.inc + db_forum.inc host.inc user/ prefs.php diff --git a/html/inc/db_forum.inc b/html/inc/db_forum.inc index d8f915f52c..951ea7bb15 100644 --- a/html/inc/db_forum.inc +++ b/html/inc/db_forum.inc @@ -291,6 +291,7 @@ function getThreadLastVisited($user, $thread){ /* $user->id - int * $thread->id - int */ + if (!$user) return $user; if ($user->id==""){ //Disable read/unread stuff for users that are not logged in $user->thread_last_visited=time(); //Always display as visited return $user; @@ -489,4 +490,4 @@ function updateThread($threadID, $title) { return true; } -?> \ No newline at end of file +?>