[BUGFIX] Added handling for array in findOneByXXX result
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 13 Apr 2013 10:00:30 +0000 (12:00 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 13 Apr 2013 11:03:45 +0000 (13:03 +0200)
commit5f424596ceea3b410f7050b4f8c63ed8d5ca4c99
treeb94ae267cac0808da9f557ed789b8340354e57c8
parent6034c5c358e8b66f22897c81ee16b82cd57eb66f
[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/19893
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