Skip to content
Snippets Groups Projects
Commit 772d7624 authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

#47692 by Wesley Tanaka. Clean up some PHP notices.

parent dd823989
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -782,7 +782,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) { ...@@ -782,7 +782,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
global $user, $forum_topic_list_header; global $user, $forum_topic_list_header;
$forum_topic_list_header = array( $forum_topic_list_header = array(
array('data' => ' '), array('data' => ' ', 'field' => NULL),
array('data' => t('Topic'), 'field' => 'n.title'), array('data' => t('Topic'), 'field' => 'n.title'),
array('data' => t('Replies'), 'field' => 'l.comment_count'), array('data' => t('Replies'), 'field' => 'l.comment_count'),
array('data' => t('Created'), 'field' => 'n.created'), array('data' => t('Created'), 'field' => 'n.created'),
...@@ -1024,13 +1024,13 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page) { ...@@ -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' => 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' => $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), '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); $output .= theme('pager', NULL, $forum_per_page, 0);
return $output; return $output;
...@@ -1127,7 +1127,7 @@ function _forum_user_last_visit($nid) { ...@@ -1127,7 +1127,7 @@ function _forum_user_last_visit($nid) {
$history[$t->nid] = $t->timestamp > NODE_NEW_LIMIT ? $t->timestamp : NODE_NEW_LIMIT; $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) { function _forum_get_topic_order($sortby) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment