Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-8818

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 3.0.x
    • 3.0.6
    • Viewing forums
    • None
    • PHP Environment:
      Database:

    Description

      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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: