Project

General

Profile

Bug #106361

Updated by Lina Wolf 4 days ago

I accidently called findBy with 
 <pre> 
 $user = $this->userRepository->findOneBy(['feUserId', $this->getFeUserId()]); 
 </pre> 

 and the findby method was passing down the column as integer "0" all the way down to the  
 Typo3DbQueryParser where in line 553 there is a type error that the property name is not a string. 

 It took me a while of debugging why this type error was triggered. While the code I used was wrong, this  
 error is easy to make and a check for types should be applied earlier I feel. 

 The error was: 
 <pre> 
 str_contains(): Argument #1 ($haystack) must be of type string, int given 
 in /var/www/html/vendor/typo3/cms-extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php line 553 
 </pre>

Back