Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-8818

Mark the first visible forum on index as unread if there's any unread global announcement

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.0.6
    • 3.0.x
    • Viewing forums
    • None
    • PHP Environment:
      Database:

      Mark the first visible forum on index as unread if there's any unread global announcement

      I got this error meanwhile I was making a special board tree, I build a index displaying only categories within categories only, no forum at 1º or 2º level.

      [phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 326: Undefined offset: 0

      Probably because there are no subforum to display at all, the error comes from this piece of code :

      		// Mark the first visible forum on index as unread if there's any unread global announcement
      		if (($forum_id == $forum_ids_moderator[0]) && ($root_data['forum_id'] == 0) && $ga_unread)
      		{
      			$forum_unread = true;
      		}

      $forum_ids_moderator is an empty array and there are no values at all, I recommend check it as :

      if ((sizeof($forum_ids_moderator) && $forum_id == $forum_ids_moderator[0]) && ($root_data['forum_id'] == 0) && $ga_unread)

      or

      if ((isset($forum_ids_moderator[0]) && $forum_id == $forum_ids_moderator[0]) && ($root_data['forum_id'] == 0) && $ga_unread)

            rxu rxu
            leviatan21 leviatan21 [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: