i'm working on symfony2 project and i get this exception. anybody have an idea on what is causing it ?
Notice: Array to string conversion in C:\wamp\www\EmploiPublic\vendor\symfony\symfony\src\Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceList.php line 457
protected function fixIndex($index)
{
if (is_bool($index) || (string) (int) $index === (string) $index) { //this is line 457
return (int) $index;
}
return (string) $index;
}
the error is generated after calling the $form->bind($request) method;
if ($request->isMethod('POST')) {
$form->bind($request);
$searchQuery = $form->getData();
}
ifstatement should do?