Project

General

Profile

Bug #101119

Updated by Sybille Peters over 1 year ago

*Update* : It should be possible to get an instance of an object with GeneralUtility::makeInstance which is instantiated with DI without the constructor arguments (at least from looking at makeInstance). 

 I am still investigating how to reproduce this, what is exactly the problem and if it is a core bug .... 


 ------------ 

 core SoftReferenceParserFactory.php constructor has 2 arguments, but is instantiated without arguments in ReferenceIndex.php if object not passed in constructor. 

 This occurred after installation of causal/extractor and only in combination with specific other extensions. I have not been able to narrow it down. The exception appears when opening "Extension Configuration". 

 Anyhow, the code in the core looks wrong: 


 in /typo3/sysext/core/Classes/Database/ReferenceIndex.php line 126 

 <pre> 
 $this->softReferenceParserFactory = $softReferenceParserFactory ?? GeneralUtility::makeInstance(SoftReferenceParserFactory::class); 
 </pre> 


 typo3/sysext/core/Classes/DataHandling/SoftReference/SoftReferenceParserFactory.php line 33 

 <pre> 
 public function __construct(FrontendInterface $runtimeCache, LoggerInterface $logger) 
 </pre> 

 instantiated in FileIndexRepository line 339 

 <pre> 
  public function updateRefIndex($id) 
     { 
         $refIndexObj = GeneralUtility::makeInstance(ReferenceIndex::class); 

 </pre> 



 h2. Versions 

 * reproduced with 11.5.28, not checked with v12 / main 


 h2. Exception stack trace 

 see file exception_extconf.txt (linked below) 

Back