-
Bug
-
Resolution: Fixed
-
Blocker
-
3.0.x
-
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)
|