• Resolved contemplate

    (@contemplate)


    Since the 4.6.0 upgrade we’ve seen fatal error in the logs about user notifications with Buddyboss. Here is the error stack.

    [09-Apr-2022 15:31:50 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function bbp_format_buddypress_notifications(), 5 passed in /home/members/public_html/wp-content/plugins/wp-ulike/includes/functions/content-types.php on line 347 and exactly 9 expected in /home/members/public_html/wp-content/plugins/buddyboss-platform/bp-forums/notifications.php:45
    Stack trace:
    #0 /home/members/public_html/wp-content/plugins/wp-ulike/includes/functions/content-types.php(347): bbp_format_buddypress_notifications('wp_ulike_topicl...', 124559, 8, 1, 'string')
    #1 /home/members/public_html/wp-includes/class-wp-hook.php(307): wp_ulike_bbp_format_buddypress_notifications('wp_ulike_topicl...', 124559, 8, 1, 'string', 'wp_ulike_topicl...', 'wp_ulike', 303967, 'web')
    #2 /home/members/public_html/wp-includes/plugin.php(233): WP_Hook->apply_filters('wp_ulike_topicl...', Array)
    #3 /home/members/public_html/wp-content/plugins/buddyboss-platform/bp-notifications/bp-notifications-template.php(535): apply_filters_ref_array('bp_notification...', Array)
    #4 /hom in /home/members/public_html/wp-content/plugins/buddyboss-platform/bp-forums/notifications.php on line 45
Viewing 1 replies (of 1 total)
  • Plugin Author Alimir

    (@alimir)

    Hey @contemplate

    Please try to remove following codes:

    if ( function_exists('bbp_get_version') && version_compare( bbp_get_version(), '2.6.0' , '<') ) {
    
    // global wp_filter to call bbPress wrapper function
    
    if( isset( $wp_filter['bp_notifications_get_notifications_for_user'][10]['bbp_format_buddypress_notifications'] ) ) {
    
    if( version_compare( $wp_version, '4.7', '>=' ) ) {
    
    $wp_filter['bp_notifications_get_notifications_for_user']->callbacks[10]['bbp_format_buddypress_notifications']['function'] = 'wp_ulike_bbp_format_buddypress_notifications';
    } else {
    
    $wp_filter['bp_notifications_get_notifications_for_user'][10]['bbp_format_buddypress_notifications']['function'] = 'wp_ulike_bbp_format_buddypress_notifications';
    }
    }
    }

    from this path:
    https://github.com/Alimir/wp-ulike/blob/6dcfa7857c937ab7b150e00b794d7f82afa8f8c8/includes/hooks/third-party.php#L40

    * this is a conflict with new version of buddypress and we will fix it in the next update.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Fatal error with Buddyboss notifications’ is closed to new replies.