Issue Bug Closed

#92601FrontendUserRepository::fetchUserInformationByEmail() must be of the type array, bool returned

Tymoteusz Motylewski 10/19/20, 12:24 updated 12/22/20, 11:04

Description

in TYPO3 v9.5 the method fetchUserInformationByEmail can in some cases return bool instead of declared array.
This result in error like:

TypeError: Uncaught exception 'TypeError' with message 
'Return value of TYPO3\CMS\FrontendLogin\Domain\Repository\FrontendUserRepository::fetchUserInformationByEmail() must be of the type array, 
bool returned' in typo3/sysext/felogin/Classes/Domain/Repository/FrontendUserRepository.php:152

The problem is that the method returns directly what fetch() returns:
return $query->execute()->fetch(FetchMode::ASSOCIATIVE);

and fetch() can return false in some cases.

Reviews 2