From 32a69ba0420593fe9951c58cb38566b09bbd7acc Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 21 Dec 2007 17:10:46 +0000 Subject: [PATCH] - fix PHP warning in forums svn path=/trunk/boinc/; revision=14431 --- checkin_notes | 6 ++++++ html/inc/forum.inc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 40a16159f2..5f4cf3dd4a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -12404,3 +12404,9 @@ David 21 Dec 2007 lib/ prefs.h common_defs.h + +David 21 Dec 2007 + - fix PHP warning in forums + + html/inc/ + forum.inc diff --git a/html/inc/forum.inc b/html/inc/forum.inc index a3dbea528d..6f97572a33 100644 --- a/html/inc/forum.inc +++ b/html/inc/forum.inc @@ -253,9 +253,9 @@ function thread_last_visit($user, $thread) { function thread_is_unread($user, $thread) { if (!$user) return false; - $log = BoincForumLogging::lookup($user->id, $thread->id); - if ($thread->timestamp < $log->timestamp) return false; if ($thread->timestamp < $user->prefs->mark_as_read_timestamp) return false; + $log = BoincForumLogging::lookup($user->id, $thread->id); + if ($log && ($thread->timestamp < $log->timestamp)) return false; return true; }