Bug #34929
PropertyMapper throws Exception if Model class has no __construct
| Status: | Resolved | Start date: | 2012-03-16 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Tobias Liebig | % Done: | 100% |
|
| Category: | - | |||
| Target version: | - | |||
| Has patch: | No | Tags: | ||
| Votes: | 0 |
Description
If a model class has no "__construct" method, the Property_TypeConverter_PersistentObjectConverter (called by the Property_PropertyMapper) will throw an exception.
#1297759968: Exception while property mapping at property path "":Method Tx_Foobar_Domain_Model_Baz::__construct() does not exist
The Tx_Extbase_Reflection_Service throws an "ReflectionException" if called for an non existing method.
Associated revisions
[BUGFIX] property mapping for models w/o __construct
If a model class has no __construct method, the PropertyMapper/
PersistentObjectConverter throws an Exception if it tried to convert an array
into object. This patch catches the ReflectionException directly in
buildObject() and assumes no constructor arguments, if no constructor exists.
Change-Id: I603bd7a26ba4242eef42f9fff6b29fea4673250c
Fixes: #34929
Releases: 4.7, 4.8
[BUGFIX] property mapping for models w/o __construct
If a model class has no __construct method, the PropertyMapper/
PersistentObjectConverter throws an Exception if it tried to convert an array
into object. This patch catches the ReflectionException directly in
buildObject() and assumes no constructor arguments, if no constructor exists.
Change-Id: I603bd7a26ba4242eef42f9fff6b29fea4673250c
Fixes: #34929
Releases: 4.7, 4.8
History
Updated by Gerrit Code Review about 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9694
Updated by Gerrit Code Review about 1 year ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9694
Updated by Gerrit Code Review about 1 year ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9694
Updated by Gerrit Code Review about 1 year ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9694
Updated by Gerrit Code Review about 1 year ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9694
Updated by Gerrit Code Review about 1 year ago
Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9694
Updated by Gerrit Code Review about 1 year ago
Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9694
Updated by Gerrit Code Review about 1 year ago
Patch set 1 for branch extbase_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/9705
Updated by Tobias Liebig about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ecd576ca40be1bcff5fc887f424edd92393e20f0.