[BUGFIX] property mapping for models w/o __construct
authorTobias Liebig <tobias.liebig@typo3.org>
Fri, 16 Mar 2012 13:00:19 +0000 (14:00 +0100)
committerFelix Oertel <typo3@foertel.com>
Fri, 16 Mar 2012 23:35:59 +0000 (00:35 +0100)
commit64499c79e034278a703ee7eaff5ee0e55866384b
tree47dfd72761a7bfde3db1bf98c490433610fa5e49
parent24b9c657537d2f46f7b60fd2227beb2e5ccbe825
[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
typo3/sysext/extbase/Classes/Property/TypeConverter/PersistentObjectConverter.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/PersistentObjectConverterTest.php