WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#48001 closed defect (bug) (invalid)

get_sites() generates a PHP warning

Reported by: henry.wright Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.2.3
Component: Networks and Sites Keywords: close
Focuses: multisite Cc:
PR Number:

Description

The following usage of get_sites() generates a PHP warning.

$sites = get_sites(
    [
        'search'         => 'foo',
        'search_columns' => 'domain'
    ]
);

Warning: array_intersect(): Argument #1 is not an array in wp-includes/class-wp-site-query.php on line 563

Change History (2)

#1 @henry.wright
2 months ago

  • Keywords close added

I just noticed search_columns _must_ be an array.

Please close

#2 @williampatton
2 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.