Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/07/2018 04:09:00 PM (5 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-template-loader.php

    r11447 r12281  
    563563 */
    564564function bp_is_template_included() {
    565     return ! empty( buddypress()->theme_compat->found_template );
     565    return isset( buddypress()->theme_compat->found_template ) && buddypress()->theme_compat->found_template;
    566566}
    567567
Note: See TracChangeset for help on using the changeset viewer.