I noticed a change in behaviour in one of my apps running on a dev server that we keep up to date with all the latest versions to track impacts
one page that has always worked on previous versions started to show the following error.
Message : database:27017: Can't canonicalize query: BadValue $in needs an array
This was caused by a array of values being passed to a $in query where one of the array elements had resolved to a null. ie.
$hCollection->find(
array(
'element'=>array(
'$in' => array(
'option1',
'option2',
null
'option3'
)
)
);
This was silently ignored in i believe in 2.4.x. in our case it was a benign bug in the code at our end that created the array with the null entry in it, but it had not shown up as an error until moving to 2.6.1-rc0.
Has anybody else seen this?