Update this line:
$x['usercount'] = intval($foruminfo[$v['forum_id']]['usercount']);
To:
$x['usercount'] = isset($foruminfo[$v['forum_id']]) && isset($foruminfo[$v['forum_id']]['usercount']) ?
intval($foruminfo[$v['forum_id']]['usercount']) : 0;
The error is; you are trying to load an array value by the key 43
, i.e. $foruminfo[$v['forum_id']][43]
and you get that error when a value doesn't exist by the specified key. So, best option is to use isset() to assert before you use the key on the array.