[BUGFIX] Extbase: Optional arguments must not throw an Exception 63/42663/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 16 Aug 2015 16:45:32 +0000 (18:45 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 17 Aug 2015 10:09:17 +0000 (12:09 +0200)
commit67535f37d48bf82921befa592a357dcc6e7bee2c
tree68f77d58ae2a9cdb68f66e8533e4b8d89ddc9fec
parent42c4f43a2e789714e4b4728567fc02addfe59020
[BUGFIX] Extbase: Optional arguments must not throw an Exception

Example:
public function barAction(\Vendor\Ext\Domain\Model\Foo $foo = NULL)

If the property mapper receives NULL, 0 or a valid value
the property mapping does not fail. But if the value is
a valid uid (>0) and there is no record with that uid
the whole property mapping fails.

While this is totally valid for required arguments,
optional arguments must be skipped.

Resolves: #55861
Resolves: #55837
Resolves: #62951
Releases: master, 6.2
Change-Id: I4c954bac50be1d34ea09bfc21f8978e9165683d1
Reviewed-on: http://review.typo3.org/42663
Reviewed-by: Alexander Schnitzler <typo3@alexanderschnitzler.de>
Tested-by: Alexander Schnitzler <typo3@alexanderschnitzler.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php
typo3/sysext/extbase/Classes/Property/PropertyMapper.php