Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/02/2013 12:20:05 PM (11 years ago)
Author:
boonebgorges
Message:

Always return false when null value is passed to bp_is_current_component()

This is an improvement on r7361, where only one condition of the component
check was checked against empty values of $component.

See #5158

Props megainfo

File:
1 edited

Legend:

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

    r7361 r7366  
    815815    $is_current_component = false;
    816816
     817    // Always return false if a null value is passed to the function
     818    if ( empty( $component ) ) {
     819        return false;
     820    }
     821
    817822    // Backward compatibility: 'xprofile' should be read as 'profile'
    818823    if ( 'xprofile' == $component )
    819824        $component = 'profile';
    820825
    821     if ( ! empty( $bp->current_component ) && ! empty( $component ) ) {
     826    if ( ! empty( $bp->current_component ) ) {
    822827
    823828        // First, check to see whether $component_name and the current
Note: See TracChangeset for help on using the changeset viewer.