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

History 511

  1. Tymoteusz Motylewski changed description 10/19/20, 12:29

  2. Tymoteusz Motylewski changed description 10/19/20, 12:29

  3. Gerrit Code Review pushed patch set 1 for master to change 66174 status New Under Review 10/19/20, 13:45

  4. Tymoteusz Motylewski changed category assigned to Tymoteusz Motylewski target version 10/19/20, 13:52

  5. Gerrit Code Review pushed patch set 2 for master to change 66174 10/19/20, 14:23

  6. Gerrit Code Review pushed patch set 3 for master to change 66174 10/19/20, 14:24

  7. Gerrit Code Review pushed patch set 4 for master to change 66174 10/19/20, 17:28

  8. Gerrit Code Review pushed patch set 1 for 10.4 to change 66131 10/19/20, 20:15

  9. Gerrit Code Review pushed patch set 2 for 10.4 to change 66131 10/19/20, 20:18

  10. Tymoteusz Motylewski commented and changed status Under Review Resolved done 0 % 100 % 10/19/20, 20:30

    Applied in changeset commit:01e78eb0bfb17d9df3de3bccd049a7f96a807293.

  11. Benni Mack changed status Resolved Closed 12/22/20, 11:04