• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 getAttachmentParams -> unexpected error?

#1
I am trying to run this function within a class:

$attachmentParams = $this->_getForumModel()->getAttachmentParams($forum, array('thread_id' => $thread['thread_id']), null, null, $attachmentHash);

However, I am not sure what to pass in to $forum. Where is it supposed to come from? I know it's an array, but what data is in there? Currently I am passing in an empty array, which makes the page comes back as 'Unexpected error occured pls try again later'.