Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fatal error: Using $this when not in object context (bp-groups-classes.php)

  • My buddypress site was working fine. I left town for a couple of days and returned to:

    Fatal error: Using $this when not in object context in /imedia/users/mavericks/htdocs/wp-content/plugins/buddypress/bp-groups/bp-groups-classes.php on line 1053

    Here’s a snippet of the offending code:
    function delete_all_for_user( $user_id ) {
    global $wpdb, $bp;

    // Get all the group ids for the current user’s groups and update counts
    $group_ids = $this->get_group_ids( $user_id ); <


    line 1053

    The bb groups DB tables all checked out OK
    wp_bp_groups
    wp_bp_groups_groupmeta
    wp_bp_groups_members

    I need suggestions on how to debug this. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You’re not running the latest version of BuddyPress, are you? Compare against https://svn.buddypress.org/tags/1.2.5.2/bp-groups/bp-groups-classes.php

    According to my plugins page and the buddypress readme file, I am using 1.2.5. I guess I can download again – strange that I ended up with different code. However, buddypress was working fine for a couple of weeks. Then after no code changes to anything in wordpress or buddypress, this error popped up.

    I changed $group_ids = $this->get_group_ids( $user_id ); to $group_ids = BP_Groups_Member::get_group_ids( $user_id ); and the error is gone. Maybe my provider changed my version of php – dunno. Anyway, I’ll download BP again…

    Thanks –Eric

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error: Using $this when not in object context (bp-groups-classes.php)’ is closed to new replies.
Skip to toolbar