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
#1

Updated by Julian Wachholz over 9 years ago

Hi,

I guess #35338 fixes this issue. :)

#2

Updated by Karsten Dambekalns over 9 years ago

  • Category set to Validation
  • Status changed from New to Closed
  • Assignee set to Bastian Waidelich
  • Target version set to 1.0.5

Closing as duplicate of #35338.

Also available in: Atom PDF