Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/07/2018 04:09:00 PM (3 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-core/bp-core-theme-compatibility.php

    r11987 r12281  
    687687
    688688    // Bail if the template already matches a BuddyPress template.
    689     if ( ! empty( buddypress()->theme_compat->found_template ) ) {
     689    if ( isset( buddypress()->theme_compat->found_template ) && buddypress()->theme_compat->found_template ) {
    690690        return $template;
    691691    }
Note: See TracChangeset for help on using the changeset viewer.