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)