Issue Bug Closed

#106151PHP warning for unset validators

Simon Praetorius 02/11/25, 11:31 updated 03/29/25, 16:07

Description

I’m getting the following PHP warning in TYPO3 v12:

> Core: Error handler (FE): PHP Warning: foreach() argument must be of type array|object, string given in /path/to/typo3/vendor/typo3/cms-form/Classes/Domain/Model/Renderable/AbstractRenderable.php line 153

My guess for the origin of this warning would be that the form in question uses __UNSET to disable validators for certain form variants:

-
  defaultValue: ''
  type: Email
  identifier: locationEmail
  label: Email
  variants:
    -
      identifier: locationEmail-optional
      condition: 'traverse(formValues, "useOperatorDataForLocation") == 1'
      validators: __UNSET
  validators:
    -
      identifier: EmailAddress
    -
      identifier: NotEmpty

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.