Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 6 years ago

#7998 closed defect (bug) (fixed)

Review `empty()` usage for PHP 5.5 compatibility

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Core Keywords:
Cc:

Description

See #7997.

In a number of places, we use empty() in a way that's incompatible with PHP < 5.5. These places should be refactored so that a variable, rather than a function call.

Change History (5)

#1 @boonebgorges
6 years ago

In 12279:

Pass only variables to empty() in bp-nouveau.

See #7998.

#2 @boonebgorges
6 years ago

In 12280:

Improved approach for avoiding empty() use in bp-nouveau template tags.

See #7998.

#3 @boonebgorges
6 years ago

In 12281:

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.

#4 @boonebgorges
6 years ago

Marking this closed, but please reopen if I've made any errors.

#5 @boonebgorges
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.