Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/11/2011 10:56:48 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Empty sanity check on $key_slugs in bp_core_set_uri_globals, to prevent debug notices or false positives in multiblog/multinetwork setups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r4096 r4104  
    122122
    123123    // Get slugs of pages into array
    124     foreach ( (array) $bp->pages as $page_key => $bp_page ) {
     124    foreach ( (array) $bp->pages as $page_key => $bp_page )
    125125        $key_slugs[$page_key] = trailingslashit( '/' . $bp_page->slug );
    126     }
     126
     127    // Bail if keyslugs are empty, as BP is not setup correct
     128    if ( empty( $key_slugs ) )
     129        return;
    127130
    128131    // Loop through page slugs and look for exact match to path
Note: See TracChangeset for help on using the changeset viewer.