Skip to:
Content

BuddyPress.org

Changeset 10928


Ignore:
Timestamp:
06/30/2016 09:58:02 AM (9 years ago)
Author:
djpaul
Message:

Core: Fix class autoloader behaviour during new installations.

This change for the 2.6 branch adds members to the component whitelist within our autoloader implementation.

In r10918, we improved the class autoloader logic introduced in #6853 to support third-party plugins doing class_exists() checks for disabled components. However, new installations of BuddyPress still trigger fatal errors because we missed that the members component is always loaded, not just the core component.

Fixes #7153

Props DJPaul, slaFFik, offereins, mercime, svenl77, scharc, tomas711.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/bp-loader.php

    r10924 r10928  
    618618        }
    619619
    620         // Sanity check 2 - Check if component is active before loading class.
    621         // Skip if PHPUnit is running.
    622         if ( 'core' !== $component && false === bp_is_active( $component ) && false === function_exists( 'tests_add_filter' ) ) {
     620        /*
     621         * Sanity check 2 - Check if component is active before loading class.
     622         * Skip if PHPUnit is running, or BuddyPress is installing for the first time.
     623         */
     624        if (
     625            ! in_array( $component, array( 'core', 'members' ), true ) &&
     626            ! bp_is_active( $component ) &&
     627            ! function_exists( 'tests_add_filter' )
     628        ) {
    623629            return;
    624630        }
Note: See TracChangeset for help on using the changeset viewer.