Bug #34048

ResolveValidator breaks on DateTime method arguments

Added by Kira Backes almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Category:
Validation
Start date:
2012-02-17
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

When a dateTime argument is set in a method the ResolveValidator breaks, he tries to create a DateTime (instead of a validator)

Fixable by the following:

Change \TYPO3\FLOW3\Validation\ValidatorResolver::resolveValidatorObjectName (line 278)

        if ($this->objectManager->isRegistered($validatorType)) {

to


        if ($this->objectManager->isRegistered($validatorType) &&
                $this->reflectionService->isClassImplementationOf($this->objectManager->getClassNameByObjectName($validatorType), 
                        'TYPO3\FLOW3\Validation\Validator\ValidatorInterface')) {

Related issues

Has duplicate TYPO3.Flow - Bug #35338: Action arguments of type DateTime throw ExceptionResolvedBastian Waidelich2012-03-28

Actions

Also available in: Atom PDF