Skip to:
Content

BuddyPress.org

Changeset 3740


Ignore:
Timestamp:
01/19/2011 08:23:03 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Prevent error in bp_get_option if $option_name is not set

File:
1 edited

Legend:

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

    r3733 r3740  
    13731373    global $bp;
    13741374
    1375     return apply_filters( 'bp_get_option', $bp->site_options[$option_name] );
     1375    if ( !empty( $bp->site_options[$option_name] ) )
     1376        $retval = $bp->site_options[$option_name];
     1377    else
     1378        $retval = false;
     1379
     1380    return apply_filters( 'bp_get_option', $retval );
    13761381}
    13771382
Note: See TracChangeset for help on using the changeset viewer.