// FIX for the 500 error on the BuddyBoss activity feed.
$message = \ContentControl\get_default_denial_message();
if ( is_bool( $restriction ) ) {
// Do nothing?
} else {
$message = $restriction->get_message();
}
/**
* Filter the excerpt to display when a post is restricted.
*
* @param string $message Message to display.
* @param object $restriction Restriction object.
*
* @return string
*/
return apply_filters(
$filter_name,
$message, //$restriction->get_message(), this throws a fatal error for BuddyBoss.
$restriction
);
// FIX for the 500 error on the BuddyBoss activity feed.
if ( is_bool( $restriction ) ) {
// Do nothing?
} else {
if ( $restriction->show_excerpts() ) {
...
Restriction settings
Demo
https://share.zight.com/eDuKpN0Q
Error log
ccv2-buddyboss-error-log.txt
Suggested fixes (tested on a local site)
PostContent.php line 166 (note: line 114 is not an issue)
content.php line 56