Skip to content
Snippets Groups Projects
Commit 3d8c8f03 authored by Elias Häußler's avatar Elias Häußler Committed by waldhacker
Browse files

[BUGFIX] Properly reset form renderable validators

Since form renderable validators are stored as SplObjectStorage
instances, it is currently impossible to properly reset those
validators, e.g. within a configured variant in the form configuration.
This is because detaching during a foreach over SplObjectStorage
instances updates the internal pointer. This leads to inconsistent
behavior in the foreach loop.

To come around this issue, a cloned SplObjectStorage is now used to
remove all currently registered validators, properly resetting all
validators for the form renderable. Additionally, this edge case is now
covered by a functional test case.

Resolves: #96424
Releases: main, 11.5
Change-Id: I91268e28a2c08fa21d655373e272204fbb9b84f4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73657


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarHelmut Hummel <typo3@helhum.io>
Tested-by: default avatarwaldhacker <hello@waldhacker.dev>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarwaldhacker <hello@waldhacker.dev>
parent 61bf14ce
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment