[buddypress-trac] [BuddyPress Trac] #7998: Review `empty()` usage for PHP 5.5 compatibility

buddypress-trac noreply at wordpress.org
Wed Nov 7 16:09:02 UTC 2018


#7998: Review `empty()` usage for PHP 5.5 compatibility
--------------------------+---------------------
 Reporter:  boonebgorges  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.0
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+---------------------

Comment (by boonebgorges):

 In [changeset:"12281" 12281]:
 {{{
 #!CommitTicketReference repository="" revision="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.
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7998#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list