symfony/symfony — pull request #7136 by chbruyand (2013-02-20 14:39:21+00:00)
Title: [Form] Fixes php fatal error in CsrfValidationListener when form is bound with a string

[Form] fixes possible php fatal error in CsrfValidationListener.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| License | MIT

Original PR : https://github.com/symfony/symfony/pull/7126

This PR includes a php unit test to reproduce the php fatal error.

$ phpunit src/Symfony/Component/Form/Tests/Extension/Csrf
PHPUnit 3.7.14 by Sebastian Bergmann.

..............PHP Fatal error: Cannot unset string offsets in src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php on line 70