You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Symfony\Component\Security\Csrf\CsrfTokenManager::getToken(): Argument #1 ($tokenId) must be of type string, null given, called in /app/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php on line 80
Seems passing any array to the setAttributes causes this unless you pass csrf_token_id value in that array, there is no sane default applied.
In my case I was passing other attributes in this array, but not the csrf_token_id, as that was not needed before today.
How to reproduce
Minimum reproducer is
$this->createFormBuilder()->setAttributes([/* blank array, or some other key pairs, not including csrf_token_id*/])->getForm()->createView();
Symfony version(s) affected
7.2.4
Description
regression caused by #59728
Seems passing any array to the
setAttributes
causes this unless you passcsrf_token_id
value in that array, there is no sane default applied.In my case I was passing other attributes in this array, but not the csrf_token_id, as that was not needed before today.
How to reproduce
Minimum reproducer is
Possible Solution
No response
Additional Context
related change https://github.com/symfony/symfony/pull/59728/files#diff-438ae1976074de3d600070f2d02f4e87bcbc847d7826ca8aaeadc4231c5d701f
The text was updated successfully, but these errors were encountered: