[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 10:02:09 +0000 (12:02 +0200)
commit710e64483ea264f3c9da6dceb51be98dcd087a91
tree253f1edb1d6f5c02e19a6e1be9de0d78f7f7c42c
parent348e484bb6dd5bba3ed7d5abbe4d176fc719c644
[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/19891
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extbase/Classes/Persistence/Repository.php
typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php