Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-8818 now.

Mark the first visible forum on index as unread if there's any unread global announcement (fix completed in vcs)

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 :
Code: Select all
      // 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 :
Code: Select all
if ((sizeof($forum_ids_moderator) && $forum_id == $forum_ids_moderator[0]) && ($root_data['forum_id'] == 0) && $ga_unread)

or
Code: Select all
if ((isset($forum_ids_moderator[0]) && $forum_id == $forum_ids_moderator[0]) && ($root_data['forum_id'] == 0) && $ga_unread)

Comments / History

Assigned ticket to user "rxu"

Action performed by rxu (Development Team Member) on Oct 28th 2009, 13:53

Changed ticket severity from "Uncategorised/normal" to "Severe"

Action performed by Acyd Burn (Server Manager) on Oct 28th 2009, 14:46

Changed ticket status from "New" to "Fix in progress"

Action performed by rxu (Development Team Member) on Oct 28th 2009, 15:33

Linked ticket with changeset: r10243

Action performed by rxu (Development Team Member) on Oct 28th 2009, 16:49

Changed ticket status from "Fix in progress" to "Fix completed in SVN"

Action performed by rxu (Development Team Member) on Oct 28th 2009, 16:50

Ticket details

Related SVN changesets