﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
11240	Ensure category__in is an array before using it in get_posts	johncoswell	ryan	"If you are directly using `category__in` with `get_posts` and neglect to make the input an array, say by passing in an integer value like a category ID, `get_posts` fails silently. Ideally, before using `category__in`, it should be verified that it is an array, and if it's not, it should be wrapped in an array if it's a value type that it expects. Then, it should be checked to see if it's an array before the rest of the block is executed (wp-includes/query.php, ~line 1802):

{{{
if ( !empty($q['category__in']) ) {
  if ( !is_array($q['category__in']) ) {
    if ( is_numeric($q['category__in']) ) {
      $q['category__in'] = array($q['category__in']);
    }
  }
  if ( is_array($q['category__in']) ) {
    ... handle category__in ...
  }
}
}}}

(the `implode` used within will fail strictness checks if it's not an array, anyway)"	defect (bug)	closed	lowest		Database	2.9	minor	invalid		
