Skip to content
Snippets Groups Projects
Commit bc7e7de8 authored by Elias Häußler's avatar Elias Häußler Committed by Oliver Hader
Browse files

[BUGFIX] Assure object is used to render hidden identity fields

With #96473, the first parameter of
`AbstractFormViewHelper::renderHiddenIdentityField()` was hardened
to `object|null`. This is actually fine since only objects are suitable
to render those fields (falling back to NULL, probably for bc reasons).
However, form elements in EXT:form cannot be directly accessed with the
FormRuntime. Instead, calling `$formRuntime[$formField]` returns the
current value of the form element instead of the elemnt itself.

To avoid situations where everything else than an object is passed to
said method, the resolved object is now checked and falls back to NULL
if it's not an object. This change restores the previous behavior of
EXT:form elements prior to the change introcuded with #96473.

Resolves: #97834
Related: #96473
Releases: main
Change-Id: Ib46fdc7d2ceca56dc5b93787b9f1f7da468128d2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75004


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBjörn Jacob <bjoern.jacob@tritum.de>
Tested-by: default avatarwaldhacker <hello@waldhacker.dev>
Tested-by: default avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: default avatarBjörn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: default avatarwaldhacker <hello@waldhacker.dev>
Reviewed-by: default avatarOliver Hader <oliver.hader@typo3.org>
parent 68544157
Branches
Tags
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