Please don't copy and paste the whole php file code here, it doesn't help. It has many included PHP files so the problem maybe in those files too. In other words your theme core functions or your added custom functions buggy. You should care about that. Just change this theme to some default theme and check. if the error disappeared see the error then you should contact to this theme support or check your added custom codes (if there is any).
In any case this errors are not wpForo errors and cannot be fixed from wpForo side.