Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/07/2018 04:09:00 PM (8 years ago)
Author:
boonebgorges
Message:

Avoid passing non-variables to empty() throughout codebase.

This ensures full compatibility with versions of PHP earlier than 5.5.

In some cases, we avoid the use of empty() by moving to its equivalent,
! isset( $foo ) || ! $foo. In some cases, we convert the tested value
to a variable before passing to empty().

See #7998.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-template.php

    r11938 r12281  
    56155615                if ( groups_get_current_group() ) {
    56165616                        $r['group_id'] = bp_get_current_group_id();
    5617                 } elseif ( ! empty( buddypress()->groups->new_group_id ) ) {
     5617                } elseif ( isset( buddypress()->groups->new_group_id ) && buddypress()->groups->new_group_id ) {
    56185618                        $r['group_id'] = buddypress()->groups->new_group_id;
    56195619                }
Note: See TracChangeset for help on using the changeset viewer.