diff options
-rw-r--r-- | modules/forum/forum.module | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 685d9ad87..39d56f398 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -782,7 +782,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) { global $user, $forum_topic_list_header; $forum_topic_list_header = array( - array('data' => ' '), + array('data' => ' ', 'field' => NULL), array('data' => t('Topic'), 'field' => 'n.title'), array('data' => t('Replies'), 'field' => 'l.comment_count'), array('data' => t('Created'), 'field' => 'n.created'), @@ -1024,13 +1024,13 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page) { array('data' => l($topic->title, "node/$topic->nid"), 'class' => 'topic'), array('data' => $topic->num_comments . ($topic->new_replies ? '<br />'. l(format_plural($topic->new_replies, '1 new', '@count new'), "node/$topic->nid", NULL, NULL, 'new') : ''), 'class' => 'replies'), array('data' => _forum_format($topic), 'class' => 'created'), - array('data' => _forum_format($topic->last_reply), 'class' => 'last-reply') + array('data' => _forum_format(isset($topic->last_reply) ? $topic->last_reply : NULL), 'class' => 'last-reply') ); } } } - $output .= theme('table', $forum_topic_list_header, $rows); + $output = theme('table', $forum_topic_list_header, $rows); $output .= theme('pager', NULL, $forum_per_page, 0); return $output; @@ -1127,7 +1127,7 @@ function _forum_user_last_visit($nid) { $history[$t->nid] = $t->timestamp > NODE_NEW_LIMIT ? $t->timestamp : NODE_NEW_LIMIT; } } - return $history[$nid] ? $history[$nid] : NODE_NEW_LIMIT; + return isset($history[$nid]) ? $history[$nid] : NODE_NEW_LIMIT; } function _forum_get_topic_order($sortby) { |