Skip to content

[Bug] PasswordValidator crashes if pi_flexform is NULL (TYPO3 13) #689

@PgDavitec

Description

@PgDavitec

Version: femanager 13.2.1
TYPO3: 13.x

When using the plugin femanager_invitation, the corresponding content element does not contain a FlexForm configuration. Therefore, the database field pi_flexform is NULL.

When submitting the form, the following error occurs:

TypeError:
TYPO3\CMS\Core\Utility\GeneralUtility::xml2array():
Argument #1 ($string) must be of type string, null given

The exception is triggered in:
femanager/Classes/Domain/Validator/PasswordValidator.php (line 94)
$flexFormValues = GeneralUtility::xml2array($this->cObj->data['pi_flexform']);

Cause

$this->cObj->data['pi_flexform'] is NULL if the content element has no FlexForm configuration.
In TYPO3 13, GeneralUtility::xml2array() strictly requires a string, so passing NULL results in a TypeError.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions