Closed
Description
// Symfony\Bridge\Doctrine\Form\ChoiceList\ORMQueryBuilderLoader.php
public function getEntitiesByIds($identifier, array $values)
{
//...
if (in_array($metadata->getTypeOfField($identifier), array('integer', 'bigint', 'smallint'))) {
$parameterType = Connection::PARAM_INT_ARRAY;
// Filter out non-integer values (e.g. ""). If we don't, some
// databases such as PostgreSQL fail.
$values = array_values(array_filter($values, function ($v) {
return (string) $v === (string) (int) $v;
}));
}
//...
}
}
On Windows (apache + php 32bit) bigint great 2147483647 always after (int) set to 2147483647: ((int) 2147483648) === 2147483647 // true
$values = array_values(array_filter($values, function ($v) {
return (string) $v === (string) (int) $v;
}));
Its clears $values great then 2147483647 and breaks the validation ChoiceType