- web: avoid error if subscribed user doesn't exist

fixed #753


svn path=/trunk/boinc/; revision=16191
This commit is contained in:
David Anderson 2008-10-12 15:32:12 +00:00
parent f5327c452e
commit 4aab5b5cb8
2 changed files with 9 additions and 1 deletions

View File

@ -8299,3 +8299,9 @@ David 10 Oct 2008
http_curl.cpp
html/user/
forum_post.php
David 12 Oct 2008
- web: avoid error if subscribed user doesn't exist
html/inc/
forum.inc

View File

@ -775,7 +775,9 @@ function create_post($content, $parent_id, $user, $forum, $thread, $signature) {
foreach ($subs as $sub) {
if ($user->id == $sub->userid) continue;
$user2 = BoincUser::lookup_id($sub->userid);
notify_subscriber($thread, $user2);
if ($user2) {
notify_subscriber($thread, $user2);
}
}
$user->update("posts=posts+1");
$thread->update("replies=replies+1, timestamp=$now");