add_filter( 'bbp_get_view_query_args', 'rew_limit') ;
function rew_limit ($args) {
$args['posts_per_page'] = -1 ;
$args['posts_per_page'] = 10 ;
return $args ;
}
Following this, and looking at it: then a bracket ‘]’ might be missing where the (= 10) line is.
Which could explain the unexpected T_FUNCTION error.
Got this code running on my site, (in the functions.php file), and it seems to work.
Happy-hacking.