Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/13/2022 08:21:06 AM (3 years ago)
Author:
imath
Message:

Avoid various PHP 8.1 deprecated notices

Here are the treated deprecated notices:

  • ctype_digit() Argument of type int will be interpreted as string in the future.
  • Automatic conversion of false to array.
  • Passing null to strtotime() $datetime parameter.

Props renatonascalves, rafiahmedd

See #8649

File:
1 edited

Legend:

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

    r13309 r13312  
    30103010    }
    30113011
    3012     $types = wp_filter_object_list( $types, $args, $operator );
     3012    $types = array_filter( wp_filter_object_list( $types, $args, $operator ) );
    30133013
    30143014    /**
     
    30243024     * @param string $operator  'or' to match any of $args, 'and' to require all.
    30253025     */
    3026     $types = apply_filters( 'bp_get_member_types', $types, $args, $operator );
    3027 
    3028     if ( 'names' === $output ) {
     3026    $types = (array) apply_filters( 'bp_get_member_types', $types, $args, $operator );
     3027
     3028    if ( $types && 'names' === $output ) {
    30293029        $types = wp_list_pluck( $types, 'name' );
    30303030    }
Note: See TracChangeset for help on using the changeset viewer.