femanager icon indicating copy to clipboard operation
femanager copied to clipboard

In2code\Femanager\Domain\Validator\ServersideValidator::getValue(): Return value must be of type string|bool, int returned

Open pfuju opened this issue 1 year ago • 5 comments

Hello there seems to be a bug in the ServersideValidator::getValue(), which requires a return value of type string or bool. In case of additional fields should be validated like gender (int), etc. this funtions throws an exception. Type decleration should be removed!

pfuju avatar Jan 18 '24 06:01 pfuju

I can confirm this error

mhuber84 avatar Jan 22 '24 11:01 mhuber84

I also can confirm this error (TYPO3 12.4.9, femanager 8.0.1)

tmhf avatar Feb 07 '24 13:02 tmhf

I can confirm this error, too.

hannesbochmann avatar Mar 04 '24 09:03 hannesbochmann

For everybody needing a fast fix, this patch will do it. But it's for sure no good fix. femanager.issue-539.txt

hannesbochmann avatar Mar 04 '24 09:03 hannesbochmann

I can also confirm this issue. An Integer should be added to the return values of the getValue method. If the property is an Object or an ObjectStorage, an Integer value should be returned.

Edit: In the main branch, the return type has already been changed to mixed.

giesenmartin avatar Apr 09 '24 12:04 giesenmartin