Project

General

Profile

Bug #77645

Updated by Markus Klein almost 7 years ago

Hi, 

 While connecting a quick SignalSlot to the Dispatcher using closure this can cause page rendering problems. 

 How to reproduce: 
 <pre> 
 \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect( 
     TYPO3\CMS\Core\Tree\TableConfiguration\TableConfiguration\DatabaseTreeDataProvider::class, 
     \TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeDataProvider::SIGNAL_PostProcessTreeData, 
     function(DatabaseTreeDataProvider $dataProvider, $treeData) { 
        // my quick changes 
     } 
 ); 
 </pre> 

 Now add a Text with Image and an plugin which is an USER_INT. 
 The text with image load an FAL image in cObj, the USER_INT tries to serialize the cObj. 

 This results in the error:  
 @Serialization Serialization of 'Closure' is not allowed@ allowed 

 I do not mind solving this issue myself, however I don't know on what level I should fix this. 

 1) Make sure cObj is serializable (using @$this->cObj->setCurrentFile(null);@ $this->cObj->setCurrentFile(null); at the end of @\TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController::render_textpic()@) \TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController::render_textpic()) 

 2) Make sure Closures are not allowed in signal slots (using validation in connect()) 




 Kind regards, 
 Benjamin

Back