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-groups/bp-groups-functions.php

    r13309 r13312  
    29702970    }
    29712971
    2972     $types = wp_filter_object_list( $types, $args, $operator );
     2972    $types = array_filter( wp_filter_object_list( $types, $args, $operator ) );
    29732973
    29742974    /**
     
    29842984     * @param string $operator  'or' to match any of $args, 'and' to require all.
    29852985     */
    2986     $types = apply_filters( 'bp_groups_get_group_types', $types, $args, $operator );
    2987 
    2988     if ( 'names' === $output ) {
     2986    $types = (array) apply_filters( 'bp_groups_get_group_types', $types, $args, $operator );
     2987
     2988    if ( $types && 'names' === $output ) {
    29892989        $types = wp_list_pluck( $types, 'name' );
    29902990    }
Note: See TracChangeset for help on using the changeset viewer.