Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/26/2014 08:11:57 PM (9 years ago)
Author:
boonebgorges
Message:

More precise error checking in bp_sort_by_key().

In order to support sorting with a value of 0, we must use isset() to verify
the existence of a value.

See #6047.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-functions.php

    r9191 r9192  
    118118        }
    119119
    120         if ( $values[0] && $values[1] ) {
     120        if ( isset( $values[0], $values[1] ) ) {
    121121            if ( "num" === "' . $type . '" ) {
    122122                $cmp = $values[0] - $values[1];
Note: See TracChangeset for help on using the changeset viewer.