Bug #35338
Action arguments of type DateTime throw Exception
Status: | Resolved | Start date: | 2012-03-28 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | Validation | |||
Target version: | TYPO3 Flow Base Distribution - 1.0.5 | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | Git 1.0 |
Description
If an action argument is an object, the ValidationResolver tries to instantiates that object to use it as Validator without checking the Interface.
So a simple controller action like following
1public function someAction(\DateTime $date) { 2}
Provokes an exception
DateTime::__construct() expects parameter 1 to be string, array given
Related issues
Associated revisions
[BUGFIX] Action arguments of type DateTime throw Exception
If an action argument is an object, the ValidatorResolver tries to
instantiate that object to use it as Validator without checks.
This change solves this by checking if the specified object implements
the ValidatorInterface.
Change-Id: Iaa28dca76da7853236faef0cefd3430d07dd2eef
Fixes: #35338
Releases: 1.0, 1.1
[BUGFIX] Action arguments of type DateTime throw Exception
If an action argument is an object, the ValidatorResolver tries to
instantiate that object to use it as Validator without checks.
This change solves this by checking if the specified object implements
the ValidatorInterface.
Change-Id: Iaa28dca76da7853236faef0cefd3430d07dd2eef
Fixes: #35338
Releases: 1.0, 1.1
History
#1 Updated by Gerrit Code Review over 3 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10069
#2 Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10069
#3 Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10069
#4 Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10069
#5 Updated by Gerrit Code Review over 3 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10069
#6 Updated by Gerrit Code Review over 3 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10069
#7 Updated by Karsten Dambekalns over 3 years ago
- Status changed from Under Review to Closed
Closing as duplicate of #35338.
#8 Updated by Karsten Dambekalns over 3 years ago
- Status changed from Closed to Under Review
- Target version changed from 1.1 to 1.0.5
- Affected Flow version changed from Git master to Git 1.0
Karsten Dambekalns wrote:
Closing as duplicate of #35338.
I have seen this once already, that closing a related bug closes the "other side" as well. Pffft.
#9 Updated by Bastian Waidelich over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5d1aa1b9aba4f1f80e0c82fd950b62aad4ee6b88.
#10 Updated by Gerrit Code Review about 3 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/11834
#11 Updated by Bastian Waidelich about 3 years ago
- Status changed from Under Review to Resolved
Applied in changeset 64a8f49896332e8f69c9d01ba2f6e68f0640e213.