When you call set_info() in these two lines:
PHP Code:
$dataman->set_info('thread', 6);
$dataman->set_info('forum', 2);
They are expecting $foruminfo and $threadinfo arrays as the data, not ids. That's what's causing the errors later. But if you say it's working in spite of these errors, then you may want to try just commenting out those lines and seeing if it works without them.