Skip to:
Content

BuddyPress.org

Changeset 13232


Ignore:
Timestamp:
02/14/2022 10:43:00 PM (4 years ago)
Author:
johnjamesjacoby
Message:

Loader: avoid conflict with any $subdir globals.

This change renames $subdir to $bp_subdir in bp-loader.php, and also unsets it at the bottom of the file.

No ticket.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-loader.php

    r13216 r13232  
    3131if ( ! file_exists( $bp_loader ) || defined( 'BP_LOAD_SOURCE' ) ) {
    3232    $bp_loader = dirname( __FILE__ ) . '/src/bp-loader.php';
    33     $subdir = 'src';
     33    $bp_subdir = 'src';
    3434} else {
    35     $subdir = 'build';
     35    $bp_subdir = 'build';
    3636}
    3737
    3838// Set source subdirectory
    39 define( 'BP_SOURCE_SUBDIRECTORY', $subdir );
     39define( 'BP_SOURCE_SUBDIRECTORY', $bp_subdir );
    4040
    4141// Define overrides - only applicable to those running trunk
     
    5151include( $bp_loader );
    5252
    53 // Unset the loader, since it's loaded in global scope
    54 unset( $bp_loader );
     53// Unset vars that were invoked in global scope
     54unset( $bp_loader, $bp_subdir );
Note: See TracChangeset for help on using the changeset viewer.