I discovered that when an empty form is submitted to FOSUserBundle:Resetting:sendEmail, the following error is thrown: "Could not convert database value "" to Doctrine Type array in path\to\Test\vendor\doctrine\dbal\lib\Doctrine\DBAL\Types\ConversionException.php at line 46 ". Since hitting the submit button by mistake is a common user action, it would be better to have the form fail validation with a message like "A username or email is required.".
I suggest adding a check to sendEmailAction():
$username = $this->container->get('request')->request->get('username');
if(empty($username)) return $this->container->get('templating')->renderResponse('FOSUserBundle:Resetting:request.html.'.$this->getEngine(), array('empty_username' => true));
And a message to request_content.html.twig:
{% if empty_username is defined %}
{{ 'resetting.request.empty_username'|trans({}, 'FOSUserBundle') }}</p>
{% endif %}
with appropriate entries in the translation files.
I had this issue with version 1.3.5 though I think it may have existed for some time.
I tried locally, and I don't get a DBAL error in this case, but a message telling me that the user with an empty username does not exist.
I suspect the error is related to some code specific to your project.
I figured it out. Somehow there was a user in the database that didn't have a username. Once that row was removed, everything worked as expected.
Most helpful comment
I figured it out. Somehow there was a user in the database that didn't have a username. Once that row was removed, everything worked as expected.