[BUGFIX] Added handling for array in findOneByXXX result
authorBenjamin Bretz <pleaserebootuniverse@googlemail.com>
Fri, 12 Apr 2013 15:30:45 +0000 (17:30 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 13 Apr 2013 09:47:43 +0000 (11:47 +0200)
commitb05551e94ce475f08aa22e0295403efc8cda9985
tree2d4a1f3a4f7c648e6cf8f8441f76bb2e55fcc5cd
parent2e3bea68ea23033eb1a5b300116016d208b55ecb
[BUGFIX] Added handling for array in findOneByXXX result

If query findOneByXXX is configured to return an array, the first array
element is returned (instead of calling ->getFirst() on a non object).

Fixes: #46035
Releases: 6.1, 6.0, 4.7, 1.3
Change-Id: I2c9d3083ce0eaebd2929ce9f50ec2a7cc36fe222
Reviewed-on: https://review.typo3.org/19855
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extbase/Classes/Persistence/Repository.php
typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php