Skip to:
Content

BuddyPress.org

Changeset 8827


Ignore:
Timestamp:
08/13/2014 06:06:42 PM (10 years ago)
Author:
r-a-y
Message:

Do not process BP_Group_Extension::setup_access_settings() if no group ID is available.

If no group ID is available, the BP_Group_Extension::setup_access_settings()
method should not do its checks. This is to avoid running DB queries
unnecessarily. (See #4785.)

Fixes #5812.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-classes.php

    r8753 r8827  
    32793279     */
    32803280    protected function setup_access_settings() {
     3281        // Bail if no gruop ID is available
     3282        if ( empty( $this->group_id ) ) {
     3283            return;
     3284        }
     3285
    32813286        // Backward compatibility
    32823287        if ( isset( $this->params['enable_nav_item'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.