Skip to:
Content

BuddyPress.org

Changeset 7690


Ignore:
Timestamp:
12/17/2013 06:32:41 PM (13 years ago)
Author:
boonebgorges
Message:

Bail out of bp_core_add_page_mappings() when no component names have been passed

This prevents PHP notices in certain cases when the automated test suite is
run incorrectly.

File:
1 edited

Legend:

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

    r7642 r7690  
    362362 * @since BuddyPress (1.7.0)
    363363 *
    364  * @param array $default_components Components to create pages for.
     364 * @param array $components Components to create pages for.
    365365 * @param string $existing 'delete' if you want to delete existing page
    366366 *        mappings and replace with new ones. Otherwise existing page mappings
    … …  
    368368 */
    369369function bp_core_add_page_mappings( $components, $existing = 'keep' ) {
     370
     371        // If no value is passed, there's nothing to do.
     372        if ( empty( $components ) ) {
     373                return;
     374        }
    370375
    371376        // Make sure that the pages are created on the root blog no matter which Dashboard the setup is being run on
Note: See TracChangeset for help on using the changeset viewer.